2013-02-23 131 views
1

我在使用git status時遇到問題。我得到這個輸出:執行git狀態時面臨問題

# On branch master 
# Your branch is ahead of 'origin/master' by 1 commit. 
# 
nothing to commit, working directory clean 

首先,提交和推送自述文件(README.md)完美地工作。我該如何解決這個問題?

+0

什麼問題? – oseiskar 2013-02-23 11:07:54

+0

瓦特母雞我運行git狀態命令,我得到上面的輸出... – h4kl0rd 2013-02-23 11:29:38

回答

2

您可以通過推動它再次掌握解決它:

git push 
or, if your master branch wasn't tracking origin/master already 
git push -u origin master 

(請參見有關「跟蹤」業務「What's the difference between git config and git push --set-upstream」和「hat exactly does the 「u」 do? 「git push -u origin master」 vs 「git push origin master

的唯一一次混帳推不解決這種情況是當你需要做一個git以更新本地回購在商店起源SHA1取。
請參閱「git: Your branch is Ahead by X commits」。

+0

我試着git推-u起源主,但給出了同樣的錯誤 – h4kl0rd 2013-02-23 12:49:35

+0

@ user1984266和'git fetch origin',後面跟着'git status'? – VonC 2013-02-23 12:54:23