Git
Ignore file permission changes:
git config core.filemode false
Merge multiple commits as one:
- Put the to-be-squashed commits on a working branch(eg:
temp-branch), if they aren’t already - Check out the target branch (e.g.
master)
git checkout master
git merge --squash temp-branch
git commit
Find differences/changes:
git diff --staged- View Staged changes before commitgit diff origin/main..<localBranchName>- between remote and local branchesgit diff <oldCommit>..<newCommit>- between two commitsgit diff -w <fileName>- Ignore whitespace differencesgit diff --stat- Lists total number of changes by filegit diff --numstat- Lists additions and deletions by filegit diff --shortstat- Lists total number of additions and deletions