SubGit has mapped a tag in my SVN repository to a Git tag. How can I add commit's to this tag int Git so that SubGit automatically pushes them to the tag in the subversion repository?
Asked
Active
Viewed 281 times
1 Answers
1
Suppose, you have "tags/tagName" in SVN repository, and it corresponds to refs/tags/tagName in Git repository.
If you want to change SVN/Git tag only without touching other branches, do the following from Git working copy:
$ git co tagName
Now "git status" will show that you're not on any branch.
$ git st
# Not currently on any branch.
nothing to commit (working directory clean)
Perform your changes, add, and commit them:
$ git add changedFile
$ git commit -m "Change changedFile in tagName."
Move 'tagName' tag to the current HEAD. --force
option will allow you to move the tag even though the 'tagName' tag already exists:
$ git tag tagName -f
(alternatively you can delete the tag with tag -d tagName
and recreate it to point to HEAD using git tag tagName
). Now push the tag to the repository:
$ git push origin refs/tags/tagName

Dmitry Pavlenko
- 8,530
- 3
- 30
- 38
-
Thanks Dmitry, it worked, although I had to first delete the remote git tag because I got "! [rejected] tagName -> tagName (already exists)" when pushing. – dw9 Jun 16 '14 at 05:06