Getting started with Git

Make a copy of a remote repository

git clone <repo-name>

Navigate to working directory as in linux

cd <repo-name>

Set up the ssh-agent

ssh-agent -s

Check the status of your repository

git status

Pull remote changes to keep local repo up to date

git pull

Add your local changes

git add <file(s)>

Commit your changes

git commit -m "<useful comment on your changes>"

Push your changes to the remote repository

git push --dry-run
git push <file(s)>

Other useful command

git clone <repo>

Git branching

Creating a new local branch and push to GitHub:

git checkout -b <branch>
git push -u origin <branch>

Deleting a branch

git branch -d <branch>
git push origin --delete <branch>