Skip to content
erikkinding edited this page Nov 23, 2010 · 3 revisions

This page will try to help you work with git!

Good Practice

Basic usage

Setup

  1. First of all, follow this guide to setup git and your encryption key. http://help.github.com/
  2. Send your "public key" (as instructed in the previously mentioned guide) to a project administrator.

Check out the master branch

  1. In a shell, go to the directory where you want to keep your local repository
  2. Issue the command: git clone git@github.com:rezamoussavi/MouRe.git

Commit you changes to the remote repository

  1. Issue the command: git add
  2. Issue the command: git commit
  3. Write a comment about your changes. Commiting without a comment is NOT PERMITTED
  4. 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.

  1. Make a safe copy of the files you have edited (or your new code snippets)
  2. Issue the command: git branch master -f
  3. Issue the command: git clean -f
  4. 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 :)

Clone this wiki locally