Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git repository from one machine to another

Tags:

People also ask

Can I copy git folder to another computer?

Thanks. Yes you can, but there's no need to copy the full working tree. You can copy just the . git folder without the working tree (i.e. as a "bare" repo) and then checkout the latest working tree on the other machine.

How do I mirror a git repository?

Navigate to the repository you just cloned. Pull in the repository's Git Large File Storage objects. Mirror-push to the new repository. Push the repository's Git Large File Storage objects to your mirror.


So I have a git repository that i pulled at one point and that repository resides on a server. I don't have access to the original repository that I pulled it from. How do i get the code from the existing server to another computer?

EDIT 1: So here's what it looks like:

  • COMPUTER A: The git repository that I originally checked out from. I don't have access to this anymore.
  • COMPUTER B: A shared server that I have the code checked out on.
  • COMPUTER C: A Local laptop.

Can i just do a simple copy of that directory without using git, or can I use git to clone if from B to C?