Git Cheat sheet

git clone https://github.com/username/repo
git pull

Set your email address and username

git config --global user.email "[email protected]"
git config --global user.name "username"

git password cache with long timeout

git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=3600000000000' 

Update push

git add .
git commit -a
git push origin master

Nested Repo

git rm --cached directory/foler/repo
git add directory/folder/repo
gitpush

Adding an existing project to GitHub

git init
git add .
git commit -m "First commit"

Copy the remote repository URL

git remote add origin remote repository URL #Sets the new remote
git remote -v # Verifies the new remote URL
git push origin master