Synchronizing a local Git repository with a remote one

后端 未结 10 561
独厮守ぢ
独厮守ぢ 2020-11-30 16:00

I want to synchronize my local repository with a remote one so that my local repository becomes a 100% copy of the remote one - meaning that if certain files differ in these

10条回答
  •  醉酒成梦
    2020-11-30 16:49

    The permanent fix if one wants to create a new branch on the remote to mirror and track your local branch(or, vice-versa) is:

    git config --global push.default current
    

    I always configure my local git with this command after I do git clone. Although it can be applied anytime when the local-remote branch "Git fatal: The current branch has no upstream branch" error occurs.

    Hope this helps. Much peace. :)

提交回复
热议问题