Git for collaboration between 2-3 pcs.

I want to share files between 2-3 windows using Git. Do I need to set one of the computers as a Git server or any other options?

+2


a source to share


4 answers


I would use the built-in Push / Pull methods. That way, you could each of the repositories pull and push code away from each other.



On Windows, you can set up other repositories by running "git remote add" and then, if you are sharing normal Windows sharing, you can "// windowsMachine1 / dir1". It's a little weird, but you will need to use forward slashes.

+4


a source


Git is 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

+3


a source


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 uses our "Dev" PC as our "central" repository for all projects. Therefore, anytime we clone a repository, we clone it from the same location. However, we could just as easily clone directly from each other, since cloning will bring all the repository information to it.

This way, if your computer and the other 2 PCs were online, you can easily operate without a central repo. I would recommend "syncing" sometimes to ensure that branching doesn't get too complicated. It can get VERY complicated if you've never used Git or another distributed version control system before, so this is definitely an advantage of using a central repository - you will most likely struggle with it as a pure distributed system until you learned more about how Git really works.

+1


a source


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

The only other option I would recommend is mercury. Mercurial is much simpler than git and 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 found that TortoiseGit overlays dramatically decrease the performance of Windows Explorer.

0


a source







All Articles