git blame
will show the author of the last commit that modified the particular line. If whitespaces were removed or that piece of code was moved around, blame will show that commit and you might blame the wrong person.
git blame -w -M
-w
will ignore whitespaces and -M
will detect moved or copied lines.
Source: https://coderwall.com/p/x8xbnq/git-don-t-blame-people-for-changing-whitespaces-or-moving-code
git merge -s recursive -Xignore-space-change
Source: http://stackoverflow.com/a/5262473/31493
Use git filter-branch
.
Source: http://stackoverflow.com/a/4112426/31493
git checkout feature_branch
git remote update
git rebase origin/master
git push -f feature_branch
git merge-base --fork-point <ancestor> [<branch>]
<branch> is optional if you're comparing with the current branch