Sri Sankaran
Sri Sankaran

Reputation: 8320

Preventing accidental Git clone of origin

How can I prevent a team member from accidentally cloning "in the wrong direction"?

We recently ran into an issue when a new team member clobbered origin by cloning local instead of cloning origin. Yeah, we were able to recover. However I'd like to prevent it from happening again.

Upvotes: 1

Views: 169

Answers (1)

Sam Giles
Sam Giles

Reputation: 650

I can't think of anyway possible other than perhaps some kind of hook?

But what I could recommend further is perhaps making sure that new developers are familiar with git. Like the person writing the article linked I used git as a kind of svn until i understood it. But after looking through some tutorials and understanding the workflow diagrams I easily got to grips with it.

The biggest mistake is users not understanding. I know people are going to make mistakes so hopefully someone who is more knowledgeable can provide a fail-safe for you. But until then, I strongly recommend making sure they know how to use git. http://osteele.com/archives/2008/05/my-git-workflow

Upvotes: 1

Related Questions