Git pulling changes between two local repositories

后端 未结 2 1767
一个人的身影
一个人的身影 2020-12-13 01:49

I have two clones of same remote repository. I have made some changes to one local repository, how can I pull these changes to the other local repository without pushing it

2条回答
  •  一整个雨季
    2020-12-13 02:45

    To add to djs response. After you add the local repo you can treat it as master, so all the other git commands work as normal.

    For example if you have made some changes in directory A and save it in commits. To retrieve those changes in directory B (same computer) you simply open a terminal in that directory and you git pull

    git pull
    

    This will copy any changes in directory A. I use this system so that I can have a "development" environment (dir A) and a "production" environment (dir B). I only git pull in dir B

提交回复
热议问题