Github Command Line Cheatsheet

Here’s a list of common command keys I use everyday for development.

Common

atom . open atom text editor

cd change directory

cd.. go back in directory

ls list directory

mkdir create folder

New-Item -itemtype file test.txt create file

New-Item -itemtype directory test.txt create folder

Github Pushing Code

git add. -A - add code

git commit -m 'commit code' - commit

git push origin branch - push code to repo

Github Branch

git branch branchname - create a branch

git branch - check status of branch

git checkout branchname - switch branch

git rm --cached index.html - remove tracked files

git remote url -v - check the url status

git set-url origin link - change remote url

git add *.html - add only html files

git add . - adds all

Helpful Links

Keep gh-pages in sync with master