ThmMrn
ThmMrn

Reputation: 33

Unique repo and multiple users in Git Windows

I am working on Git for Windows and I have some constraints. Git must be used offline, on a unique computer disconnected from network. There are multiple Windows users on this computer, and they will work on the same team-project. I can't use a distributed solution because of the important size of the files.

So, I thought this solution:

Also, I can see with the git log command the commits and who made it.

What do you think about that ?

Thanks in advance

Thomas

Upvotes: 1

Views: 180

Answers (1)

VonC
VonC

Reputation: 1323573

I have implemented a similar solution for a folder maintained by several users.

I have wrapped git in order to force them to define a user.name and email that I set in GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL environment variables.

That way, I don't touch the local config, and rely only on environment variables set for the duration of a user's session.

All users are making their commit directly in the shared folder.

If any of those environment variable isn't defined, they enter their name and email first (the git wrapper then set those variables).

If those environment variables are set, then the git wrapper simply calls the regular git.exe.


Such a setup isn't for a repo made to be cloned, but for a local folder for which you which to track any modification (git log)

Upvotes: 1

Related Questions