问题
I've a private REPO in GIT 1.7 in a Ubuntu Server that is available for a group of users. I would like to know if there is a way to learn which user had already cloned that mentioned REPO. Is there a command to do this ? Any help or comment is more than welcome.
回答1:
The only way to do this is to check server logs for users who has accessed the repository, git itself does not record anything like this.
However this will give you list of people who did access directly the server, but this is no way definite list of people who have cloned the repository - they can clone from each other without any limitations, that's how distributed version control works.
回答2:
Now I user Subversion - but this overall concept seems valid - I'm sure I'll get downvoted by anyone that knows Git but oh well...
if you have a pre-existing group, couldn't you then do a git clone --reference <repository>
, by doing on check on each group member? One would show up if there was a clone there for that user, no?
来源:https://stackoverflow.com/questions/14835124/git-how-do-i-know-who-or-which-users-cloned-the-repo