鍍金池/ 問答/Linux/ git reset后執(zhí)行git pull為什么會提示沒有關聯(lián)遠程倉庫呢?

git reset后執(zhí)行git pull為什么會提示沒有關聯(lián)遠程倉庫呢?

之前是有在該分支提交代碼到遠程倉庫,然后執(zhí)行git reset后再執(zhí)行git pull就提示沒有關聯(lián)遠程倉庫,無法git pull

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> dev
回答
編輯回答
陪妳哭

不是沒有關聯(lián)倉庫,是當前分支沒有關聯(lián)遠程分支,很可能的是你當前分支是新建的,沒有push上去

你可以把先push一下,應該就好了

2017年5月4日 14:30