Configuring git for local network

1

I have a machine here in the company where the source code is, it would be our local server. We have 2 programmers, who have access to the source that shares this machine.

In the GIT settings on each machine if I want to put eg git user.name, user.email, should not I just consider the machine I'm doing this?

Now with each new configuration I always consider the last, for example if on the machine of programmer 1 I set user.name "John" and give a git config -list will appear the name like john, but in machine programmer 2 set user.name "Maria" and then give a git config -list will display the name as Maria.

I want to know how to configure each machine as a single user, as each programmer will commit the files that are changing.

For example if programmer 1 changes the index file, I imagine that programmer 2 should not have access to the file until the change is complete and if programmer 1 gives a GIT status to the file and should not appear as changing, only if programmer 2 does this, maybe you should use branche to resolve this conflict?

    
asked by anonymous 20.02.2017 / 15:10

1 answer

1

Git is not quite as you might imagine. It's a decentralized, non-centralized versioning system, as you're apparently doing, sharing files over a network.

You can even have a git server on your network, but each programmer will download the server repository to your machine and work locally in isolation. At the end, it will send the change to the server.

Learn more about this at official book online available in Portuguese.

    
20.02.2017 / 15:19