----- Original Message ----- 
  From: Kimura Masayuki 
  To: git-users@googlegroups.com 
  Sent: Monday, June 02, 2014 3:23 AM
  Subject: [git-users] Change commit messages after pushed on remote repository


  I use git and Redmine for managing team task and development source code.
  When we commit source changes, we use following format:

  Func: change something (refs #xxx)

  When we import the git repository to another new Redmine, it is problem that 
there are no appropriate (refs #xxx) , so we might blur other issues pages on 
  We planned git reflog to eliminate all of (refs #xxx) but hashed number  will 
be changed so it is problem that we already released the code with hash number.

  Do you know any way to change commit message without changing hash number?
  I guess I can modify commit objects in git repository, but I don't know how 
to do.

  Thank you for your support.

I don't use Redmine but you cannot change Git commits without changing the sha1 
hash for that commit. That is by design and is a core part of the validation 
and verification of a version control repository. ('git rebase' is used when 
refining / re-writing history before publishing, which again changes the 
sha1's, but that doesn't matter until that history is published)

If you want to re-write the history to remove the old "(refs #xxx)" values, 
then you can use 'git filter-branch'. You can also insert a reference to the 
old commit sha1 (and the source repo) if needed. But the commit's sha1 hash 
will change.


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to