View Single Post
Old 10-15-2014, 08:39 AM   #1047
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by KevinH View Post
So is there an easy way to hand edit the history itself without having to rebuild, and recommit almost 60 versions again?
Maybe you are looking for git-filter-branch?
Quote:
Originally Posted by git help filter-branch
Lets you rewrite Git revision history by rewriting the branches mentioned in the <rev-list options>, applying custom filters on each revision. Those filters can modify each tree (e.g. removing a file or running a perl rewrite on all files) or information about each commit. Otherwise, all information (including original commit times or merge information) will be preserved.
Yes, it will let you change commit author without changing committer. Here is a relevant (but a bit different) example provided by GitHub.

While it's obvious, I'd like to add that when history will be rewritten, you will have a different "repository" (in comparison with repository on GitHub and all previous clones of it). As it's mostly an organizational and not technical problem, you may want to delete and re-create repository on GitHub (though it's optional). EDIT: that GitHub example shows also how to forcefully push changed history without re-creating repository.

In addition to AcidWeb words, reference format (style) of Git commit messages is described here. Message format isn't dictated by Git itself, but linked post is a good format example or starting point for making your own style.

UPD: JFYI (and for sake of historical correctness), URL in the very first commit message is wrong, it literally have three dots in it:
Code:
http://www.mit.edu/afs/athena/user/m.../mobiunpack.py

Last edited by eureka; 10-15-2014 at 08:51 AM.
eureka is offline   Reply With Quote