Using git as a centralized version server

I am currently using svn at work.

Our setup: everyone has a working copy, and we transfer the svn server served by apache2.

So, I fixed the changed, another update, and everyone can work with the copy at their discretion.

Therefore, it is quite easy to deploy.

But now I would like to do the same, but with Git. It would be possible?

I would like to have a git repository on my main server, develop at home, commit changes to the server, etc.

thanks for the help

+7
git svn apache version
source share
5 answers

Yes it is possible.

On the server where your material is located:

git init git add . 

On your local computer:

  git clone git://yourserver/repo localfolder 

To get the changes:

  git pull git fetch 

To send changes to the server:

  git push 

Here are the links on how to configure the server

+1
source share

Git - SVN Crash Course

This is especially of interest to the starter.

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

Then check out the rest of the documentation on the git site

Git documentation

+4
source share

One thing to add to the other answers:

While a centralized workflow (with one “central” Git repository) is certainly not possible, you need to keep in mind that Git organizes its data in different ways (like everyone else, looking at the contents of the data to display a different property, like rename files). See this answer for a larger distinction between Svn and Git .

One consequence is that you do not have to have only one Git central repository, but several, especially if you have many groups of files with different and independent histories (they evolve at their own pace).

SVN can store all these different groups in one repository and can fork or tag any part that it wants (it is just a matter of copying what you need in the “directory” representing the branch or tag). Git branch and tag at the storage level.

If your set of files is reasonably consistent, you can have one central Git repository, but if you have several components, there may be several “central” Git repositories better.

+3
source share

Just set up a centralized repo that everyone pushes and pulls at.

Just because git has no idea about a central or preferred repo does not mean that you cannot assign it by agreement between your team.

+2
source share

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 is more a matter of tweaking your process to use it however you wish.

+1
source share

All Articles