I've got an out-of-date repo with nothing to add on my machine. I want to pull in the latest stable branch from github.
Should I just clone over it? I'm not sure.
I think you should be able to do a fetch on all the files, then reset them to the origin:
git fetch --all
git reset --hard origin/master
You could probably do it in either order, too.
If you want to remove any files you have added that aren't tracked, do a clean too:
git clean -f
The advantage to this approach over cloning to a new directory is that you will still retain some of the history/reflog. If you absolutely do not care that data though, then either approach is fine.
Just git pull --all
should get the newest stuff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With