Skip to content

Instantly share code, notes, and snippets.

@barnes7td
Last active March 12, 2019 01:33
Show Gist options
  • Save barnes7td/ae537576f020d6fe62d9ccd556901814 to your computer and use it in GitHub Desktop.
Save barnes7td/ae537576f020d6fe62d9ccd556901814 to your computer and use it in GitHub Desktop.

git init - Create a repo from scratch.

git clone - Copy a repo from GitHub or other remote repo.

git add - Stage files or file changes to your local repo.

git commit - Commit (Save changes as a record) to the local repo.

git merge - Add changes from another branch onto current branch.

git checkout - The command to switch between branches.

git branch - create a branch, or list branches (-a).

git push - Send local changes on a branch to GitHub (or other remote repo).

git pull - Get remote changes from a branch on GitHub and merge to your local repo.

git remote - List remote repo addresses (like GitHub).

git status - Check the current state of the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment