Closed Roger-luo closed 8 years ago
The way to squash is this :
git rebase -i master
then pick up all the commits required by changing pick
to s
, commenting the commits which you do not require
once it is rebased, do a
git push -f origin <branch-name>
Also there is a slight problem here, the commits should be on a new branch, this can be done by
New branch can be created by
git branch <branch-name>
git checkout <branch-name>
Now commit the changes on this branch and push the changes. Then create a pull request and it is open for review ! Please do let me know if something is not clear.
@amitjamadagni There is only a noop
GNU nano 2.5.3 File: ...0.4/QuCmp/.git/rebase-merge/git-rebase-todo
noop
# Rebase 1a616ef..1a616ef onto 1a616ef (1 command(s))
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# d, drop = remove commit
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
It seems I do not need to squash?
It seems I squashed acroy's commit into one commit too, it was closed automatically. Finally, figure out how squash works.... @amitjamadagni