1
My question is limited to whether the way I did it is correct to use Git within the company I work for.
I know Git is decentralized, but since we have a network local code server I chose to do it the following way that it works but I want to know if it’s correct:
On the server where all the devs
has access created a git init --bare
to receive the commits
.
Each dev
copied the source code once to your machine and the commits
are directed to the repository --bare
I set up on the mainframe.
In other words, in every machine I had to give one git add remote origin /endereco/do/repositorio
, for when to give a commit
and a push
the changes direct the versioning to this directory that I have configured.
Then in the normal flow before making any changes each dev
needs to give a pull
to be always updated, carry out the change give the commit
and the push
. And so far it’s all working out so beautifully.
I wonder if this way is correct.
In my view, it is. because I believe that’s basically what happens with Github, for example. But I don’t know much about Git, it’s still on my list to study deeper.
– Woss
when you say that each developer "copied" the code, you mean
git clone
? 'Cause that way the stepgit add remote origin
would not need to be done, they would already be automatically linked to the original repository.– Ricardo Moraleida