My question is limited to whether the way I did it is correct to use Git within the company where I work.
I know that Git is decentralized, however as we have local code server on network I have chosen to do the following way that works but I want to know if it is correct:
On the server where all devs
has access I created a git init --bare
to receive commits
.
Each dev
copied the source code once for your machine and the commits
is directed to the --bare
pository that I set up on the central server.
That is, on each machine I had to give git add remote origin /endereco/do/repositorio
, so when I give a commit
and a push
the changes direct the versioning to this directory that I set up.
Then in the normal flow before making any changes every dev
needs to give a pull
to be always updated, make the change give commit
and push
. And so far everything is working.
I wonder if this is correct.