Skip to content

Instantly share code, notes, and snippets.

@V8tr
Last active April 15, 2019 11:00
Show Gist options
  • Save V8tr/75650dc26eb8ad4a46c9a29f12564a2e to your computer and use it in GitHub Desktop.
Save V8tr/75650dc26eb8ad4a46c9a29f12564a2e to your computer and use it in GitHub Desktop.
Git tips & tricks
git rebase origin/master
  • Review difference of local and remote branch:
git log HEAD..origin/master
  • Remove .orig files:
find . -name '*.orig' -delete
  • Remove ignored files
git rm -r --cached .
git add .
  • Most frequenty changed files. Shows how many times a file was affected by a commit.
git log -n 1000 --format=format: --name-only | egrep -v '^$' | grep '\.[h|m]$' | sort | uniq -c | sort -r | head -20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment