Git: oldcommit-split-preserve-timestamp   no comments

Posted at 7:30 am in Uncategorized

Splitting a old git commit while preserving commit timestamps

hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git rebase -i c2180
Stopped at be7755e... Comments
You can amend the commit now, with

	git commit --amend

Once you are satisfied with your changes, run

	git rebase --continue

hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git reset HEAD^
Unstaged changes after reset:
M	parser/createSG/src/no/hig/rag/parser/BuildInitialSceneGraph.java
M	parser/createSG/src/no/hig/rag/parser/ColladaParse.java
M	parser/createSG/src/no/hig/rag/parser/GameObject.java
M	parser/createSG/src/no/hig/rag/parser/Main.java
M	parser/createSG/src/no/hig/rag/parser/MtlParse.java
M	parser/createSG/src/no/hig/rag/parser/ObjParse.java
hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git commit -c be7755e -- parser/createSG/src/no/hig/rag/parser/MtlParse.java parser/createSG/src/no/hig/rag/parser/ObjParse.java
[detached HEAD 7b4ef13] Remove unused classes from createSG
 2 files changed, 0 insertions(+), 382 deletions(-)
 delete mode 100644 parser/createSG/src/no/hig/rag/parser/MtlParse.java
 delete mode 100644 parser/createSG/src/no/hig/rag/parser/ObjParse.java
hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git commit -ac be7755e
[detached HEAD 1a6d313] Add javadoc comments and cleanup sourcecode
 4 files changed, 37 insertions(+), 48 deletions(-)
hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git rebase --continue
Successfully rebased and updated refs/heads/master.

Referenses

  • http://book.git-scm.com/4_interactive_rebasing.html
  • http://manpages.ubuntu.com/manpages/maverick/man1/git-commit.1.html#contenttoc3

Written by Anders Einar on June 15th, 2011

Leave a Reply