hoangdangninh
7/11/2017 - 5:39 AM

preview before merge in git

preview before merge in git

git log ..otherbranch
  #=> list of changes that will be merged into current branch.
git diff ...otherbranch
  #=> diff from common ancestor (merge base) to the head of what will be merged. Note the three dots.
gitk ...otherbranch
  #=> graphical representation of the branches since they were merged last time.

### For the fainted heart (not quite) #####  
merge --no-ff --no-commit, and then diff HEAD.

### Push to a branch in origin if not being tracked ###
git push origin HEAD:<remote-branch-name>