1. Open Terminal

2. Change the current working directory to your local repository

3. Checking the status of the repository (go inside project folder)

git status

4. Staging files (add files to the staging area)

touch test.py
git add test.py

#git add test01.py test02.py test03.py
git add . # adds all files in the directory
git reset HEAD test.py #unstage a file that was commited

5. Making commits

git commit -m "Commit message" # commit a file

git log # list of all comits 

git checkout <commit-hash> # go back to a previous commited state

git checkout master # go back to last commit

6. Pushing changes to repository

git push origin

7. Remove files

git rm test.py
git commit -m "remove test.py"

git rm -r my_folder #delete folder

8. Add / Commit multiple files

git add .

git commit -m "m: my mesage flag" 
git commit -a -m "m: my mesage flag"

9. Create a Github blog with fastpages

  1. Create a new repository from fastpage https://github.com/fastai/fastpages/generate sims-coursera

  2. Follow the indication in Initial Setup file to generate and create secret and public keys

  3. Accept / Merge the pullrequest: https://github.com/simsisim/sims-coursera/pull/1 (3-4 min)

  4. Blog generated: https://github.com/simsisim/sims-coursera

  5. Customize blog title etc. by changing: https://github.com/simsisim/sims-coursera/blob/master/_config.yml

10. Git / Clone a new repository from Github to local

  1. mkdir new-folder

  2. cd new-folder

  3. git init

  4. git clone https://github.com/new-folder.git

11. Ungit a folder

rm -Rf .git .gitignore

11. References