Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an easy way to clear a mercurial repository of artifacts?

Sometimes I have to return to a really old branch when I depended on a ton of external libraries. Updating to the current branch removes the source files for those dependencies, but the artifacts are left there, as well as a few folders and such.

I would like to have a way to force a mercurial repo to be as if I had just cloned it from the remote (master) repository. I don't want to just nuke my repo and re-clone it, because that forces me to download hundreds of MB from the remote server.

like image 428
Billy ONeal Avatar asked Aug 22 '10 17:08

Billy ONeal


1 Answers

Why don't you clone not from remote server, but from your local repository? After that you could nuke your repo with old untracked files.

hg clone path_to_your_local_repo your_new_repo

After this you could map your new repo to your remote server in hgrc file

like image 51
Denis Kniazhev Avatar answered Oct 05 '22 23:10

Denis Kniazhev