Skip to content

Instantly share code, notes, and snippets.

@BolajiOlajide
Created April 19, 2021 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BolajiOlajide/bbcd8a17d217bf430a7c792fec87c84d to your computer and use it in GitHub Desktop.
Save BolajiOlajide/bbcd8a17d217bf430a7c792fec87c84d to your computer and use it in GitHub Desktop.
some cool git tricks
git blame file_name
git show commit_sha
git log -S "word/phrase to search for occurence" --reverse (get it in reverse order)
git push --force-with-lease # fail if someone pushed something to the same branch before this is about to happen
git config --global commit.verbose true # include the commit history when commiting stuff
git config --global core.editor "code"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment