It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to remove repository from local without removing it from remote?

Because my development machine has a tiny drive, I need to conserve drive space whenever I can.  Is there any way to remove a local repository that I am not currently using from the local drive without removing it from the remote site (I'm using GitLab, so I don't want to remove it from GitLab, only from my local machine)?  Thanks!

2 answers

4 votes
Mikael Sandberg Community Leader Nov 04, 2016

Just delete the repository locally, it will not affect your remote repository. Just make sure that before you delete it, that you have pushed all your commits to the remote. In SourceTree you just right-click on the repository bookmark and delete it, and it will ask if you want to delete just the bookmark or also the repository. Note that it will leave the .git directory, so you will have to manually remove that.

Your local repository and your remote repository are equal.

You may delete local repository and this not make any change in you remote repository.

use git command for get remote repo,

add remote repo for your local repo

or delete link to your remote repo

git remote -v 
git remote add
git remote rm

 

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

1,660 views 0 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you