Am Montag, 12. März 2018 16:42:41 UTC+1 schrieb Michael Gersten:
> There are two different ways to do this in git. Well, two ways that I know 
> of. 
> The plan ahead method: make a new branch, and do anything that you want on 
> the new branch. If you are playing around with more than one original 
> branch, you may need to make more than one new branch. 
> With this method, cleanup is simple: delete the branches that you created. 

This is the best, exactly what I hopefully won't forget the next time. 

The recovery method: the "git reset" command. "Reset" has the job of moving 
> the branch pointers. The manual page is extremely confusing, but the bottom 
> line is this: reset is used to move a branch pointer to a new location in 
> the tree. This allows you to move the pointers back to where they were when 
> you first cloned the repo. "-Hard" is the variant of reset that says, 
> "throw away anything done, and make it look exactly like it was at the 
> specified SHA"

OK then, this is if I forgot to branch it: 

git reset --hard HEAD

Seems exactly to work as I wish, Thank very much :)



You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to