Initial set-up

git init
git remote add origin #Add Git repo to folder
git remote set-url origin #Switch to SSH
git pull origin master
git branch --set-upstream-to origin/master


git status -s
git add -A
git add -u
git push

Garbage Clean

git gc

Delete every untracked file and directory

git clean -d -f -x

Remove directory from remote repository after adding them to .gitignore

git rm -r --cached some-directory
git commit -m 'Remove the now ignored directory "some-directory"'
git push origin master

Reset repo when having pull conflicts

git fetch --all
git reset --hard origin/master

Helpful URLs