Remove a directory from the repository in Mecurial

ShannonRamirez March 16, 2018

I want to delete a folder called documents from my repository.  I'm wanting to reduce the size of my repo in bitbucket as well.  On my desktop i ran

 

hg remove documents/*

hg commit -m "remove documents"

hg update -r 0

I also added the documents/* folder to my .hgignore.  So now if i add a doc to that folder it's not getting picked up.. just what i want.  Now i'd like to know how to remove the documents folder from the repository to reduce it's size.  I would guess something has to/can be done locally to reduce the size on my machine as well.. i just don't know how to do it.  

hoping for some guidence... i'm using mecurial and have TortiseHg on my machine if that helps.

 

thanks

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2018

Hi Shannon, you can do that from Bitbucket. To do so, navigate to your repository, click on Source, now click on the file you'd like to delete, go to the right menu, click the down arrow and select Delete:

remove.png 

You'll get a popup window to confirm the deletion and commit the changes. Remember you'll need to pull this changes on your computer to get the file removed in your local copy.

Hope that helps!

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events