for merging two commits
git reset --soft "HEAD^"
git commit --amend
for merging more than two (say x wher x is integer)recent commits
git reset --soft HEAD~x
- https://stackoverflow.com/questions/31874670/merge-parent-branch-into-child-branch
- https://stackoverflow.com/questions/6836461/updating-the-current-branch-from-parent-branch
- https://stackoverflow.com/questions/2003505/how-do-i-delete-a-git-branch-both-locally-and-remotely
- git branch -f [branchname] commit x(where x is an integer)
- git reset HEAD~1 not good
- git revert branchname good
- git checkout commitname
- git checkout HEAD^
- git checkout HEAD~x
- copying some work from branch to some branch
git cherry-pick c2 c4
- interactive rebase
git rebase -i
- git rebase -i branchname --solution-ordering C3,C5,C4