[英]Why doesn't "git status" show that the remote branch has changed?
I have created a branch fea-test
and pushed to the remote repository.我创建了一个分支
fea-test
并推送到远程存储库。 Then, I added some files in the same remote branch fea-test
, but when I do git status
, it says然后,我在同一个远程分支
fea-test
中添加了一些文件,但是当我执行git status
时,它说
Your branch is up to date with 'origin/fea-test'.
nothing to commit, working tree clean
According to me, it should display something like据我说,它应该显示类似
Your branch is behind with 'origin/fea-test'.
use git pull to get the changes
because this is how it happens in GitLab (and now I'm using GitHub).因为这就是它在 GitLab 中发生的方式(现在我使用的是 GitHub)。 What am I doing wrong here?
我在这里做错了什么?
To be clear, check that these the steps you did:为了清楚起见,请检查您执行的这些步骤:
git status
on local machine and expected the newly created files / commits to be listed.git status
并期望列出新创建的文件/提交。 If I'm right, then you have to git fetch
the changes from GitHub (so Your branch is behind of 'origin/fea-test' by XY commits
will be shown in status) or use git pull
to fetch + merge those (so your local branch will be updated).如果我是对的,那么您必须 git 从
git fetch
更改(因此Your branch is behind of 'origin/fea-test' by XY commits
将显示在状态中)或使用git pull
合并那些(BD61593B933FDC2您的本地分支将被更新)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.