Git cheatsheet
Published 6 months ago: July 13, 2020
Updated: October 26, 2020
Git cheatsheet
This cheatsheet is a small collection of handy snippets for quick reference in tricky situations. Feel free to suggest edits, propose additions, complain about something, disagree with content or such and the like. Every feedback is a welcome one.
Commands
Initializes/creates a new repository
git initClone a repository into current working directory
git cloneView changes since last commit
git statusView untracked files, expanding subdirectories
git status -uAdd file to commit
git add <filename>Skip editor, directly adding commit message
git commit –m "message describing commit"Commit all edits
git commit -asend master branch to remote repository
git push origin masterUpdate local repository with master branch
git pull