Skip to content

Instantly share code, notes, and snippets.

@theWhiteFox
Last active May 12, 2017 14:57
Show Gist options
  • Save theWhiteFox/90764aa1f5f4f81b07d4 to your computer and use it in GitHub Desktop.
Save theWhiteFox/90764aa1f5f4f81b07d4 to your computer and use it in GitHub Desktop.
Git commands
git init // Initialize
git add . // add all
git rm --cached name_of_file // gitignore file
git reset // unadds all files
git reset HEAD~1 // uncommit
git commit -m 'First commit'
git remote add origin "remote repository URL"
git remote -v // check remote
git pull origin master
git push origin master
git status
git rm -r "name-of-directory" or for all *
git rm "name-of-file"
git commit -m "Remove all"
git push origin master
git clone "HTTPS clone URL"
git clean -f // force
git rebase --abort // fatal: Could not open file .git/rebase-merge/done for reading: No such file or directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment