开发者

How do you set up github version control for a team of two?

开发者 https://www.devze.com 2023-04-07 20:31 出处:网络
We\'re trying to set up github version control for a Jsp-project in NetBeans 7.0.1. The problem is we don\'t have a clue what to do. I Have set up a public account on github and done all the steps in

We're trying to set up github version control for a Jsp-project in NetBeans 7.0.1. The problem is we don't have a clue what to do. I Have set up a public account on github and done all the steps in the install guide on github, ssh keys and everything. So if I wanted to work on my own in this project I wouldn't have a problem.

The problem is how to get my collaborator started. He has an account on github. he set it up with ssh keys and such. In the admin view on github I added him as a collaborator, but we don't know the next step.

So the question is how to connect the collaborator to the project? something like t开发者_如何学Chis I suppose?

git remote add origin git@github.com:username/Hello-World.git
git pull

(another question: Do I git only the source files or the whole project folder?)


Regarding your second question... That's a tough one.

A few months ago I was working with a colleague on a JavaEE project and we initially decided to share the whole Eclipse project. Since I was working on Windows and he was working on Linux, we had much trouble maintaining everything. Also we had to make sure that we don't accidentally push up our .project dir, because that would overwrite the settings on the other persons machine, messing up the whole project. So we ended up removing all the project files from the repository and just keeping the source folders (src and WebContent). Both of us set up an empty project, made our settings and than imported the source code from the repository. Was some trouble setting it up until everybody had the same project settings, but afterwards it worked like a charm. For just two developers that is fine, I guess for a bigger team, there might be better solutions.

So, I guess Netbeans handles the project settings in a similar way. So in my opinion you should just share the code.


For the first access, what your collaborator should be able to do is a git clone of your repository.
That will set for him the remote address.
If he is declared as a collaborator, he then should be able to push/pull to that remote repo.

Note that your collaborator should have received a push notification access.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号