How to add a local repo and treat it as a remote repo

前端 未结 4 598
傲寒
傲寒 2020-11-27 09:15

I\'m trying to make a local repo act as a remote with the name bak for another local repo on my PC, using the following:

git remote add /home/sa         


        
4条回答
  •  不知归路
    2020-11-27 09:40

    It appears that your format is incorrect:

    If you want to share a locally created repository, or you want to take contributions from someone elses repository - if you want to interact in any way with a new repository, it's generally easiest to add it as a remote. You do that by running git remote add [alias] [url]. That adds [url] under a local remote named [alias].

    #example
    $ git remote
    $ git remote add github git@github.com:schacon/hw.git
    $ git remote -v
    

    http://gitref.org/remotes/#remote

提交回复
热议问题