tags:

views:

121

answers:

2

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.

+1  A: 

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.

Simone Carletti
Given there is no good solution, this one appears to be "best" so far. I did not know I could do that with reset. But its a recent commit so this will work fine.
Danny
+2  A: 

(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.

Jakub Narębski