Moving a git repository

后端 未结 5 1810
星月不相逢
星月不相逢 2020-12-24 11:28

This question may be dumb, but I\'ve been wondering it for a while. It\'s about git repositories, but I assume it\'s the same for local repositories for other DVCS\'.

<
5条回答
  •  春和景丽
    2020-12-24 12:01

    You can move the git directory from one machine to another or say, you want to migrate your project folder.

    All the information about origin is stored in '.git' folder, which is created when you initialize a git repository under a directory on your system.

    Procedure

    1. : Move the project folder to other location.
    2. : If the project folder is being moved to a new machine, then create corresponding SSH key-pair.
    3. : Tell git who you are using: git config --global user.email "your_git_email_id@youremail"

提交回复
热议问题