How to unlink local directory from remote repository?

Asked

Viewed 5,685 times

6

I need to switch machines and unlink the local directory from the repository to use it only on another machine.

How can I do this untying?

1 answer

10


You can:

  1. Delete the machine directory. Then the computer will no longer have the source code and consequently it will be impossible to make any changes.

  2. Remove the remote of the local repository.

    git remote rm origin
    

    Since GIT is a distributed versioning system, everyone who has made a clone from the remote repository have a repository of its own. What happens is that modifications made to these repositories themselves are reflected to the central repository whenever a push (similarly, the pull does the reverse process).

    Make the local repository no longer have one remote prevents them from being made pushs and pulls.

  • Valew man, you helped me a lot ;)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.