Skip to content

Instantly share code, notes, and snippets.

@landbryo
Last active May 23, 2018 15:06
Show Gist options
  • Save landbryo/a6e796ead3c82619f2396d7c6b49348e to your computer and use it in GitHub Desktop.
Save landbryo/a6e796ead3c82619f2396d7c6b49348e to your computer and use it in GitHub Desktop.
Git commands I've come to find useful and want to find in one place.
git clone https:// // clone repository
git add -A // stages all
git add . // stages new and modified, without deleted
git add -u // stages modified and deleted, without new
git commit -m "add message here" //commit changes with a message
git push origin master //push changes to master branch
git reset --hard
git pull
SOURCES:
https://stackoverflow.com/questions/572549/difference-between-git-add-a-and-git-add
https://stackoverflow.com/questions/14318234/how-do-i-ignore-an-error-on-git-pull-about-my-local-changes-would-be-overwritt
https://alvinalexander.com/git/git-cheat-sheet-git-reference-commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment