Advertisement
private775

GIT: compare branch with its base

Aug 22nd, 2019
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | None | 0 0
  1. # https://stackoverflow.com/questions/20808892/git-diff-between-current-branch-and-master-but-not-including-unmerged-master-com/20809283
  2.  
  3. # get base of branch
  4. git merge-base master branch
  5. # example output 47dfa4a64fbbf8cc71006b488e18ddc87b801ffe
  6.  
  7. # get diff between branch and base
  8. git diff 47dfa4a64fbbf8cc71006b488e18ddc87b801ffe branch
  9.  
  10. # use diff2html (npm: diff2html-cli)
  11. diff2html -- 47dfa4a64fbbf8cc71006b488e18ddc87b801ffe branch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement