Skip to content

Instantly share code, notes, and snippets.

@xaratustrah
Last active August 27, 2018 12:00
Show Gist options
  • Save xaratustrah/914ca668eb9bc74cf3b24ce78dd0c53c to your computer and use it in GitHub Desktop.
Save xaratustrah/914ca668eb9bc74cf3b24ce78dd0c53c to your computer and use it in GitHub Desktop.
frequently_used_git_commands.md

Frequently used git commands

hard reset:

git fetch --all
git reset --hard origin/master

undo local changes of a file match origin master:

git checkout -- file

check status of only python files:

git status | grep '\.py$'

git ls

git ls-files --others --exclude-standard

show origin of the current repository

git remote show origin
git config --get remote.origin.url
git remote -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment