Git状态 - 不显示远程Repo的状态

Ank*_*054 1 git

刚从Git开始,我发现了一些奇怪的东西.

我在github上有一个git repo - https://github.com/ankh2054/mo​​dx.git 我的服务器/ home/Modx上有一个目录

我已经将github添加为远程Repo,如果我运行该命令

git remote -v
Run Code Online (Sandbox Code Playgroud)

我得到以下输出

origin  https://github.com/ankh2054/modx.git (fetch)
origin  https://github.com/ankh2054/modx.git (push)
Run Code Online (Sandbox Code Playgroud)

但是当我运行git status时,它没有提到我的远程Repo的任何信息.因此,当我在本地更新和提交文件时,它不会提示我关于我的本地更新,而不是我的远程回购.

git status

On branch master
nothing to commit, working directory clean
Run Code Online (Sandbox Code Playgroud)

我应该说我相信是:

On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
Run Code Online (Sandbox Code Playgroud)

Von*_*onC 5

检查输出git branch -avvv.

如果您没有看到任何远程分支,则表示您需要:

 git fetch
 git branch -u origin/master
Run Code Online (Sandbox Code Playgroud)

从那里你将master和之间进行比较origin/master.
你将能够做一个简单的事情git push.