开发者

Git for collaboration between 2-3 windows pcs

开发者 https://www.devze.com 2022-12-29 10:27 出处:网络
I want to share files between 2-3 windows pcs using Git. Do I need to set one of the pc\'s as 开发者_StackOverflow中文版the Git Server or is there any other options?I would use the built in Push/Pull

I want to share files between 2-3 windows pcs using Git. Do I need to set one of the pc's as 开发者_StackOverflow中文版the Git Server or is there any other options?


I would use the built in Push/Pull methods. So you could have each of the repositories pulling and pushing code from each other.

In windows you can setup the other repositories by doing a "git remote add" and then if you share over normal windows sharing you can "//windowsMachine1/dir1". It is a bit strange but you will need to use forward slashes.


Git is a DVCS, so you don't need to have a server (and there is no central server). Just copy over the repo and you're done. However, you could:

http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt


Technically, since Git is distributed, there is no critical need for a "central server" or "central repository", as it would traditionally be called.

I use both Git and Mercurial, and what we do in my office is use our "Dev" PC as our "central" repository location for all projects. So any time we clone a repository, we clone it from the same location. However, we could just as easily clone directly from one another, since cloning will bring all the repository information with it.

Thus, if your PC and your other 2 PCs were networked, you could easily act without a central repo. I would recommend "synchronizing" on occasion, in order to ensure that branching doesn't get too complex. It can get VERY complex if you have never used Git or another distributed version control system before, so that is definitely an advantage of using a central repository--you are more likely to have struggles using it as a pure distributed system until you've learned more about how Git actually functions.


Git will do what you want, without requiring a server and there are plenty of other options.

The only other option I would recommend is mercurial. Mercurial is much simpler than git and is much faster on windows.

You should look into TortoiseGit, and TortoiseHG which provide explorer integration for git and mercurial. TortoiseGit is more mature than TortoiseHG, but I have found that TortoiseGit's icon overlays dramatically decrease the performance of windows explorer.

0

精彩评论

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