无法更新:没有被跟踪的分支 [英] Can't update: no tracked branch
问题描述
我在 Windows 上使用 Android Studio(预览版)0.6.0,并试图在 GitHub 上共享我的项目.我使用 Git Shell 初始化、添加、提交并将项目推送到 GitHub.但是,当我尝试从 Android Studio 中更新我的项目时,出现此错误:>
I am on Android Studio (Preview) 0.6.0 on Windows and was trying to share my project on GitHub. I used Git Shell to initialize, add, commit and push the project to GitHub. But when I tried to update my project from within Android Studio , I got this error:
Can't update: no tracked branch
No tracked branch configured for branch master.
To make your branch track a remote branch call, for example,
git branch --set-upstream master origin/master
它确实提供了这个建议,但我现在不确定该怎么做.有没有办法在 Android Studio 中解决这个问题?
It does provide this suggestion but I am not sure what to do at this point. Is there a way to fix this from within Android Studio?
推荐答案
所以在阅读了一些关于 git 如何设置 repo 的内容之后.我意识到我运行了命令
So after reading a bit on how git sets up the repo. I realized that I ran the command
git push origin master
但是我应该第一次跑
git push -u origin master
最初设置上游.一路走好!
which sets up the upstream initially. Way to go!
这篇关于无法更新:没有被跟踪的分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!