Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you remove a Mercurial repository

I accidently put a Mercurial repository in the wrong place. How do I remove it? This is in Linux.

like image 424
Jon Cox Avatar asked Dec 21 '10 17:12

Jon Cox


People also ask

How do I cancel my Mercurial repository?

Jonathan: Removing it is quite proper. We try to keep simple things simple in Mercurial: hg init creates . hg for you, and rm -r . hg will undo that.

How do I delete a branch in Mercurial?

You cannot. You can close the branch to hide it from the list of active branches, but you cannot completely delete it. This happens because in mercurial and in git the "branch" term means different things. In mercurial - it is a set of changesets.

What is a Mercurial repository?

Mercurial is a free, distributed version control system. It's also referred to as a revision control system or Mercurial source control. It is used by software development teams to manage and track changes across projects.


1 Answers

Recursively remove the .hg directory? You can also just move it; they are portable, and the setup files inside of .hg contain no absolute paths that would break if placed elsewhere on the system.

From the comments: rm -r .hg

like image 95
Brandon Rhodes Avatar answered Sep 18 '22 15:09

Brandon Rhodes