Skip to content

Instantly share code, notes, and snippets.

@ebinnion
Last active December 13, 2015 23:19
Show Gist options
  • Save ebinnion/4991209 to your computer and use it in GitHub Desktop.
Save ebinnion/4991209 to your computer and use it in GitHub Desktop.
A short list I'll manage of my most used git commands
git init - "Self explanatory"
git remote add origin [git_url] - "Adds a remote repository named origin"
git add . - "Add files you want to commit"
git add -u - "Will remove deleted files from git"
git commit -m 'your message' - "Commit with a message"
git push origin master - "Push repository to Github"
git update-index --assume-unchanged [[path]] - Will ignore file from git unless explicitly added
git reset --soft HEAD^ - Deletes last commit and keeps any code changes
git commit --amend --reuse-message HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment