Clean-up unsynced commits

76 views
Skip to first unread message

joerg.s...@gmx.de

unread,
Feb 1, 2018, 4:23:17 AM2/1/18
to SubGit Users
Hi,

how do we clean-up unsynced commits that have been resolved in a different way (not via the proposed procedure in notes/subgit/unsynced) and are no longer valid?

We have such a case and allthough we have our repositories in sync, we get a reminder from the server for the now obsolete unsynced commit with every push. How do we get manually rid of this obsolete commit and the note?

Regards,
Jörg

TMate Software Support

unread,
Feb 1, 2018, 9:55:00 AM2/1/18
to joerg.s...@gmx.de, SubGit Users
Hello Jörg,

How do we get manually rid of this obsolete commit and the note?
You can just remove corresponding refs manually. As soon as you remove those refs, SubGit stops displaying the warning. See instructions below:

1. As repository administrator, you can remove the unsynced refs with the following commands:

a) Single ref:

cd $GIT_REPO
git update-ref -d refs/subgit/unsynced/heads/master/1

b) All unsynced refs:

cd $GIT_REPO
git for-each-ref --format="%(refname)" refs/subgit/unsynced/ | while read -r ref; do git update-ref -d "$ref"; done

c) Unsynced refs for a single branch (e.g. master):

cd $GIT_REPO
git for-each-ref --format="%(refname)" refs/subgit/unsynced/heads/master/ | while read -r ref; do git update-ref -d "$ref"; done

2. As a regular Git user from a cloned repository/working tree:

a) Single ref:

git push origin --delete refs/subgit/unsynced/heads/master/1

b) All unsynced refs:

git fetch origin +refs/subgit/unsynced/*:refs/subgit/unsynced/*
git for-each-ref --format="%(refname)" refs/subgit/unsynced/ | while read -r ref; do git push origin --delete "$ref"; git update-ref -d "$ref"; done

c) Unsynced refs for a single branch (e.g. master):

git fetch origin +refs/subgit/unsynced/heads/master/*:refs/subgit/unsynced/heads/master/*
git for-each-ref --format="%(refname)" refs/subgit/unsynced/heads/master/ | while read -r ref; do git push origin --delete "$ref"; git update-ref -d "$ref"; done

Kind regards,
Semyon Vadishev,
TMate Software,
http://tmatesoft.com/ git-svn import & mirror

--
You received this message because you are subscribed to the Google Groups "SubGit Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subgit-users+unsubscribe@googlegroups.com.
To post to this group, send email to subgit...@googlegroups.com.
Visit this group at https://groups.google.com/group/subgit-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/subgit-users/2df00998-1b96-472b-941c-b2cd70f70b6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

joerg.s...@gmx.de

unread,
Feb 2, 2018, 3:53:01 AM2/2/18
to SubGit Users
Thanks!
Reply all
Reply to author
Forward
0 new messages