Skip to content

Instantly share code, notes, and snippets.

@wktdev
Created February 24, 2017 05:25
Show Gist options
  • Save wktdev/f522d0c1818e77f6b129b56306924429 to your computer and use it in GitHub Desktop.
Save wktdev/f522d0c1818e77f6b129b56306924429 to your computer and use it in GitHub Desktop.
Checkpoint:
```
git checkout -b branch-name
git status (use often as needed)
git add .
git commit -m "Description"
git checkout master
git merge branch-name
git push origin master
git branch -d branch-name
```
Assignment:
```
git checkout -b branch-name
git status (use often as needed)
git add .
git commit -m "Description"
git push origin branch-name
git checkout master
#IF TOLD TO MERGE ASSIGNMENT
git merge branch-name
git push origin master
```
`git init` - Create a repo from scratch.
`git clone` - Copy a repo from GitHub or other remote repo.
`git add` - Track and stage files or stage already tracked file changes to your local repo.
`git commit` - Commit (Save changes as a record) to the local repo.
`git merge` - Copy commits 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