Unlink local directory from remote directory (Git and Github)

3

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?

    
asked by anonymous 13.11.2017 / 12:56

1 answer

6

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.

  • 13.11.2017 / 13:05