Skip to content

Instantly share code, notes, and snippets.

@hamgammon
Created November 20, 2019 23:04
Show Gist options
  • Save hamgammon/96cdbe81c7d1c3d16e015b1dac9f7d11 to your computer and use it in GitHub Desktop.
Save hamgammon/96cdbe81c7d1c3d16e015b1dac9f7d11 to your computer and use it in GitHub Desktop.
Cheatsheet
This is a reference list of the most commonly used Git commands.
Commands related to a remote repository:
git clone git@github.com:USER-NAME/REPOSITORY-NAME.git or git clone https://github.com/user-name/repository-name.git
git push origin master
Commands related to workflow:
git add .
git commit -m "A message describing what you have done to make this snapshot different"
Commands related to checking status or log history
git status
git log
The basic Git syntax is program | action | destination.
For example,
git add . is read as git | add | ., where the period represents everything in the current directory;
git commit -m "message" is read as git | commit -m | "message"; and
git status is read as git | status | (no destination).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment