Learn Git

Want to learn Git? I've made a simple cheat sheet for you. Firstly download Git

Configure Git username

git config --global user.name "Your Name"

Configure Git email

git config --global user.email "hey@domain.co"

Create Repository

git init example

Navigate to directory

cd /Users/Username/example

Add file(s)

git add name.filetype

Commit changes

git commit -m "I committed, yo"

View commits

git log

Connect to repository

git remote add origin https://github.com/username/repo

Push to master

git push -u origin master

Pull the latest copy

git pull origin master

Changes

git diff HEAD

Create a branch

git branch example

Switch to different branch

git checkout branch-name

Remove files

git rm 'example.filetype'

Merge branches (scary!)

git merge example

Delete a branch

git branch -d example

Push to origin

git push