Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Git Commands
#check changes on current branch
git status
#ignore changes to a file before committed
# ignore file
git checkout <file>
# ignore cached file on github
git rm --cached <file>
# Fetch changes from github
# pull changes from Github
git fetch
#merge into “fetched” branch
git merge origin /<branch_name>
# Reset all changes after last commit
#reset the changes
git reset HEAD --hard
#clean out everything untracked
git clean -fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.