Question

SVN permits the ability to update an old commit message via hook. How can I go about updating my git-svn copy's version of the commit message? The only reference I could find was a bug report requesting this feature about a year ago on debian.org.

Is this possible in the current version of Git v1.6.3.*?

If not, what's the most intelligent way to go about updating the local copy? The dumbest method that occured to me was brute-force; repeating a git svn clone operation.

Was it helpful?

Solution

I came across a similar problem a few weeks ago. I wanted to re-fetch a commit sent 6 commits behind. I executed

git reset --hard HEAD~6

to remove the latest 6 commits from Git, then I fetched them again from SVN.

git svn rebase

Probably it's not the best way to solve this problem, but it was the easier solution in that moment.

OTHER TIPS

(Not really an answer)

You can't without rewriting history, shown how to do it by weppos in his answer.
Commits in Git are immutable.

In the future you would be able to use "git notes" to annotate commit message.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top