Git
From Leo's Notes
This page was last edited on 4 June 2015, at 19:21.
Quick Use Guide
Adding/Removing remote origin
git remote add origin git@gitlab-blah:user/repo.git git remote remove origin
To use public key authentication with SSH, you must configure it inside ~/.ssh/config instead of passing the key as you would with SSH (ie: ssh -i ~/.ssh/privkey) like so:
Host gitlab-blah
HostName gitlab.cpsc.ucalgary.ca
User git
IdentityFile ~/.ssh/gitlab-leo
Pushing to remote origin
git push origin branch
Where branch can be the master.
Committing Files
Ensure all files you want to commit are staged. To add all files:
git add -A .
See the status with:
git status
To commit:
git commit -m 'message'
Reverting Changes
To revert any changes in the current repository, use (???)
git reset