version control - Git folding commits without squash -


i have following scenario:

i have staged changes , have 3 commits ahead of master. want staged changes apart of oldest commit of three. there couple ways know of this, i'm looking alternate/better methods. here's first method think of.

git commit -m "some dummy message since going squashed" git rebase -i head~4 

which bring editor, , can move dummy commit want , squash it.

is there better/faster/or different way this? i'm trying more productive, , learn git inside , out, info appreciated.

you can use git reset, described here: http://git-scm.com/blog/2011/07/11/reset.html

git reset --soft head~3 

then

git commit 

again.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -