> On Feb 5, 4:27 pm, Paul Miller <[email protected]> wrote: >> On Fri, Feb 5, 2010 at 2:51 PM, Tekkub <[email protected]> wrote: >> > When your local version is screwed up it's usually simplest to move the >> > local repo out of the way and reclone. >> >> git reset --hard origin/master >> >> ?? I think that's simplest. 2cents.
On Mon, Feb 8, 2010 at 12:18 AM, Tchalvak <[email protected]> wrote: > Git reset --hard , the "wipe everything, I don't care" command. > Beware of [strikethrough]-d-o-g-[/strikethrough] the hard reset. I'm actually not disagreeing with this at all. It's a heavy handed reset that goes back to a known state. But how does this differ from moving the repo out of the way and re-cloning? I suppose re-cloning can preserve some changes you might have made locally. You could always make a branch or use the stash if you need to save something. Starting to get more complicated. Therefore, Tekkub is probably right. I thought about it a bit longer and if the repo is screwed up to the point the reset won't even work, you'll have to re-clone anyway. If you want to make sure you save something and you're not totally sure how to do it, it never hurts to backup your repo and clone a new one. I suppose I prefer reset --hard over re-cloning because it's a more git-ly thing to do. -Paul -- If riding in an airplane is flying, then riding in a boat is swimming. 114 jumps, 47.2 minutes of freefall, 90.4 freefall miles. -- You received this message because you are subscribed to the Google Groups "GitHub" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/github?hl=en.
