Saturday, 15 May 2010

git - How do I overwrite my local repo with the one on github? -


I got an out-of-date repo with nothing to add on my machine. I got the latest stable branch from Gitub I want to draw

Should I Clone It? I'm not sure.

I think you should be able to fetch all the files, then reset them to the original :

  git fetch --all git reset - hard root / master   

You can probably do it in any order, too.

If you added any files that have not been tracked, clear:

  git clean -f   

The advantage of this approach when cloning a new directory is that you still have some history / if you do not care about that data exactly, then the approach is okay.

No comments:

Post a Comment