re: Spooktober: Git Horror Story VIEW POST

FULL DISCUSSION
 

It felt embarrassing, as I am a junior dev. And I've been working with git commands for 3 years so far.

Don't worry, we all forget commands :-)

The thing is git clone creates a copy of the repository on your local machine pointing to the HEAD. In this copy you have the entire history and all the branches, develop included.

Once cloned you could have switched branch from master to develop by issuing: git checkout develop

git clone -b develop URL is, I think, a shortcut of the two commands.

 

Once cloned you could have switched branch from master to develop by issuing: git checkout develop

That's what they described doing, isn't it?

 

Yeah, I forgot about the origin part :-)

Johanathan's answer is more complete

code of conduct - report abuse