【发布时间】:2017-12-21 23:19:04
【问题描述】:
我正在尝试将更改推送到远程仓库,但由于某种原因我不能。
当我git branch 这是我看到的:
develop
feature/all_features
* feature/Tommaso
当我git status:
On branch feature/Tommaso
nothing to commit, working directory clean
我可以 clone repo 和 pull 来自开发,但是当我这样做时 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> feature/Tommaso
我猜问题是远程仓库没有我在本地创建的当前分支。
编辑:我不够清楚:我想在 feature/allfeatures 中创建分支 feature/Tommaso 。我这样说是为了那些可能认为我正在尝试创建develop 的分支的人
是这样吗?我该如何解决?
如果您需要其他信息来解决问题,请告诉我。提前谢谢你
【问题讨论】:
-
您首先要查看的是使用
git pull origin branch_name指定要从中提取的分支。这是您问题的解决方案 -
谢谢!让我确定一下:如果我希望 feature/Tommaso 成为 feature/allfeatures 的一个分支,这样做是否足够: git pull origin feature/allfeatures ?在此之后它问我:将name_of_repository 的分支'feature/allfeatures' 合并到 feature/Tommaso,这是正确的吗?请回答,我接受你的评论:)