-
Notifications
You must be signed in to change notification settings - Fork 1
Using git
erikkinding edited this page Nov 23, 2010
·
3 revisions
This page will try to help you work with git!
Good Practice
Basic usage
Setup
- First of all, follow this guide to setup git and your encryption key. http://help.github.com/
- Send your "public key" (as instructed in the previously mentioned guide) to a project administrator.
Check out the master branch
- In a shell, go to the directory where you want to keep your local repository
- Issue the command: git clone git@github.com:rezamoussavi/MouRe.git
Commit you changes to the remote repository
- Issue the command: git add
- Issue the command: git commit
- Write a comment about your changes. Commiting without a comment is NOT PERMITTED
- Issue the command: git push
Now you have the basic knowledge to work with git
** Troubleshooting and other stuff **
If you get conflicts when trying to commit, you might be working on "old files". Save your local changes in a temporary place so they wont get lost while solving this problem.
- Make a safe copy of the files you have edited (or your new code snippets)
- Issue the command: git branch master -f
- Issue the command: git clean -f
- Issue the command: git pull
Now you have a fully updated version of all files on the repository. Check the files you wanted to update. Add your changes and commit them :)