Unlink local directory from remote directory (Git and Github)

Posted on

Question :

I need to change the machine and I need to unlink the current directory to use it only on another machine.

So it can not be changed any more from this. How can I do it?

    

Answer :

You can:

  • Erase the machine directory. So the computer will no longer have the source code and therefore it will be impossible to make any changes.

  • Remove the remote from the local repository.

    git remote rm origin
    

    Since the GIT is a distributed versioning system, everyone who made a% of the remote repository has a proper repository . What happens is that the modifications made to these own repositories are reflected to the central repository whenever a clone is made (in an analogous way, push does the inverse process).

    Making the local repository no longer contain pull prevents remote s and push s from being made.

  • Leave a Reply

    Your email address will not be published. Required fields are marked *