VSC中的Github错误

时间:2018-05-15 04:53:29

标签: git github

我仍然是Github的新手,当我试图拉动和推动时,我总是得到这个错误,

> git pull --tags
> git show :_gitdar/app/core/Route.php
> git show :_gitdar/index.php
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> master
> git show :_gitdar/app/core/Route.php
> git show :_gitdar/index.php
> git fetch
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse master
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
> git for-each-ref --format %(refname) %(objectname) --sort -committerdate
> git remote --verbose
> git show :_gitdar/app/core/Route.php
> git show :_gitdar/index.php
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse master

我应该解决这个问题?每当我拉动并推动git时,视觉工作室代码总是给我这个输出。

1 个答案:

答案 0 :(得分:0)

首先,切换回命令行,并在本地仓库中执行git status

其次,如果Git(通过Visual Studio Code)甚至不知道master,那么在尝试推送之前,你可能还没有添加和提交文件。
那个或你在detached HEAD