Using git as a centralized version server

你。 提交于 2019-12-03 00:29:50
Egon

Yes it's possible.

On the server where your stuff is located:

  git init
  git add .

On your local computer:

  git clone git://yourserver/repo localfolder

To get changes:

  git pull
  git fetch

To send changes to server:

  git push

Here are links how to setup your server

Git - SVN Crash Course

Especially this is of interest for a starter

git init
git add
git clone git://...
git pull
git fetch
git push

Then check the rest of the documentation on the git site

Git documentation

VonC

One thing to add to the other answers:

While a centralized workflow (with one "central" Git repository) is off course possible, you need to keep in mind Git organizes its data differently (as a all, looking into the data content to infer various property, like file rename). See this answer for more differences between Svn and Git.

One consequence is that you should not necessarily consider having just one Git central repository, but several, especially if you have many group of files with different and independent history (they evolve each at their own pace).

SVN can store all those different group in one repository and can branch or tag whatever part it wants (it is just a matter of copying what you need in a "directory" representing a branch or a tag). Git branch and tag at the repository level.

If your set of files is quite coherent, you can have one Git central repo, but if you have several components, may be several "central" Git repos are better.

Just set up a centralised repo that everyone pushes to and pulls from.

Just because git has no concept of a central or preferred repo, that doesn't mean you can't designate one to be so by convention among your team.

Absolutely - you can set up central (bare) GIT repositories that can be used as a central point. Or use something like GitHub.

With GIT it's more a matter of getting your process set up to use it as you wish.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!