Setup
git clone https://github.com/[USERNAME]/[PROJECT].git
git remote set-url origin git@github.com:[USERNAME]/[PROJECT].git
Add to .bash_profile:
----------------
if [ -z "$SSH_AUTH_SOCK" ] ; then
eval `ssh-agent -s`
ssh-add /home/ec2-user/.ssh/id_rsa_github
ssh-add -l
fi
----------------
Log out & log back in
ssh -T git@github.com
Update your entire repository
git add .
git commit -m "[MESSAGE]"
git push origin master
Reset your local copy to the remote copy:
git checkout [repo]
rm -Rf [repo]; git clone [repo_stub]
Reset your local copy to the last commit:
git reset commit