views:

300

answers:

2

Hi,

Here is very simple question for experienced Git user. I've created repository on git hosting and set up mine pc:

git init
git remote add origin git@*.sourcerepo.com:*/ *.git

Then, after some changes I do:

git add .
git commit
git push

All these actions are done on first developer pc.

Now the question: How does second developer access and take changes to repo? First of all he has to clone repo?

+3  A: 

Yes. It's going to be

 git clone $giturl
 git add .
 git commit
 git push

for him.

innaM
+2  A: 

Yes, you would use clone. You also should be sure to set the sharedrepository config option:

git config core.sharedRepository "true"

You should also be aware, with multiple commiters that the fetch option would let you preview the changes in the main repository, and how they would apply to you:

git fetch
git diff origin

or you may want to simply see a list of files and diff each one seperately:

git diff --name-status origin
MattG