Skip to content
Genie Jhang edited this page Jul 29, 2014 · 10 revisions

This note is written for specific use of our repository.

How to clone the repository

git clone https://[email protected]/geniejhang/SPiRITROOT.git SPiRITROOT

This will clone the repository to SPiRITROOT folder in your hard disk. After done cloning, don't forget to change the committer to you. Inside the cloned directory, type
git config user.name "YOUR NAME"
and
git config user.email "[email protected]"

Commit your progresses

Commit as many as you can and log of that progress as detailed as it can be. This will allow the others and especially you to track bugs when those are found. Also, that could be used as documents for the others to come and join to the collaboration.

If you added new file or changed the existing files, you have to add that file to the commit list.

git add FILENAME1 FILENAME2 FOLDER ETC

After that,

git commit

That will lead you vi in which you can type the log. After writing up the log, type :wq to save the log and file changes to the local repository.

Pull the changes by other collaborators from GitHub

git pull origin develop

This may occur conflicts if the same part of one file is modified by two or more people. In that case, you should manually resolve the conflicts by opening that file. After you resolved the conflicts, add it to the commit list and commit.

After you pull from the repository, don't forget to recompile all the source codes. Go into the build directory in your cloned directory, type cmake ../ and make -j24. This will make all your libraries updated.

Push the changes in local repository

This is the most important part!

Before you push your commits to GitHub, make sure that the compilation is done without any error otherwise make the added or modified files not compiled.

If someone pulled the changes from the remote repository in the morning and found out that it won't be compiled, that's quite frustrating.

All the commits are stored in your local repository. So, at the end of the day or whenever you want to store the data to GitHub server, you have to push your repository to GitHub server.

Pushing repository can be done when the current local repository is up-to-dated. So, pull the repository from GitHub server before you push and if there are conflicts resolve them before pushing.

After you've done all the pulling and resolving job, type

git push origin develop

This will push your local repository to GitHub server so that everyone can download your progress.


You can read the link below for detailed explanation.

http://rogerdudler.github.io/git-guide/index.html

http://git-scm.com/book

https://help.github.com

Clone this wiki locally