How can I combine commit using git rebase -


how can combine 1st commit 4th commit in git using 'git rebase'. read here http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html, 'squash' command in 'git rebase' meld previous commit.

in git, have

$ git log commit 9a30d13 commit 4a6729e commit 4a6729e commit 4a6729e commit a610898 

basically, want changes 9a30d13 combine changes in a610898, new history is

$ git log commit 4a6729e commit 4a6729e commit 4a6729e commit a610898 + 9a30d13 

i have not pushed anything.

thank you.

when interactive rebase described @ link, can reorder commits, too. once change order, can squash 9a30d13 a610898.

when interactive rebase comes up, (with oldest commits on top):

pick a610898 message pick 4a6729e message b pick 4a6729e message c pick 4a6729e message d pick 9a30d13 message e 

you reorder them:

pick a610898 message pick 9a30d13 message e pick 4a6729e message b pick 4a6729e message c pick 4a6729e message d 

and change 9a30d13 squash rather pick:

pick a610898 message squash 9a30d13 message e pick 4a6729e message b pick 4a6729e message c pick 4a6729e message d 

save & exit, , you're done. you'll chance enter new commit message new a610898 + 9a30d13 commit.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -