且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从一台机器到另一台机器的Git存储库

更新时间:2023-02-02 16:48:31

您可以从网络位置拉出或将整个目录(包含.git文件夹)另一台电脑。

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?

You can either pull from the network location or copy the entire directory(containing .git folder) accross to the other computer.