Wednesday, August 8, 2012

Collaboration using github

Steps to collaborate an existing project in githhub.

1. Create your account at github.com
2. Give your username to the author of the project.
3. Confirm that you have been added as collaborator in the project.
4. Create your own local git repository.
5. In the local repository, issue the command:

git remote add origin https://github.com//project_name

For example:

git remote add origin https://github.com/breezyrush/my.Eskwela
This will add a reference to a remote repository in github for the project my.Eskwela owned by breezyrush
6. To get all the files already in the remote repository, issue the command:

git pull origin master

This command will copy all the files already in the remote repository to your local repository.
7. After copying you are now free to look at the files change it or add a new file. The thing is -- every changes should be committed to your local repository. After you have done the changes and tested the code yourself and is now ready to share the changes to the collaborator, it's now time to issue the command:

git push origin master

That's it. Now to get updated of other collaborator's changes, you may want to pull from time to time for you to have an updated version in your local repository. Fin.