private775 icon

GIT: compare branch with its base

private775 | PRO | 08/22/19 09:11:11 AM UTC | 0 ⭐ | 798 👁️ | Never ⏰ | []
Bash |

440 B

|

None

|

0 👍

/

0 👎

# https://stackoverflow.com/questions/20808892/git-diff-between-current-branch-and-master-but-not-including-unmerged-master-com/20809283
 
# get base of branch
git merge-base master branch
# example output 47dfa4a64fbbf8cc71006b488e18ddc87b801ffe
 
# get diff between branch and base
git diff 47dfa4a64fbbf8cc71006b488e18ddc87b801ffe branch
 
# use diff2html (npm: diff2html-cli)
diff2html -- 47dfa4a64fbbf8cc71006b488e18ddc87b801ffe branch

Comments