Since it is the month of all things spooky, I thought it would be a good idea to post one of my scary experiences while developing, to get into t...
For further actions, you may consider blocking this person and/or reporting abuse
Don't worry, we all forget commands :-)
The thing is
git clone
creates a copy of the repository on your local machine pointing to theHEAD
. In this copy you have the entire history and all the branches,develop
included.Once cloned you could have switched branch from
master
todevelop
by issuing:git checkout develop
git clone -b develop URL
is, I think, a shortcut of the two commands.That's what they described doing, isn't it?
Yeah, I forgot about the origin part :-)
Johanathan's answer is more complete
I've been working with git for 6 years now and I've had some major nightmares over the years. Hours or days of code gone in one swift enter key stroke.
I've learnt one git command that's since saved me from those nightmares:
It keeps a local history of all the changes to a repo. So even if you screw up your branch, the commit is still there and can be found and restored using reflog.
Nice takeaways
Hey Ben,
Thank you for taking the time to read.