Git分支领先于原点/主控 [英] Git branch is ahead of origin/master
问题描述
在Mac上使用GitHub应用程序(不是cli),我有这个错误,我不太明白,也不知道如何解决。我知道它的错误,因为应用程序抛出一个窗口,上面写着GitHub Error。我需要将更改提交到下面列出的文件,但GitHub不会让我。当我按下提交按钮时,出现错误,似乎我无法做任何事情来解决它。任何帮助都会很棒。
#在分支大师
#你的分支领先于'origin / master' 2提交。
#
#没有为commit提交更改:
#(使用git add< file> ...更新将提交的内容)
#(使用git结账 - < file> ...放弃工作目录中的更改)
#
#修改:.gitignore
#修改:haystack.egg-info / SOURCES.txt
#modified:haystack / __ init__.py
#modified:haystack / search.py
#modified:haystack / static / css / layout.css
#modified:haystack / static / images /classifications/G.png
#modified:haystack / static / images / classifications / M.png
#modified:haystack / static / images / classifications / MA.png
#modified:haystack /static/images/classifications/PG.png
#modified:haystack / static / images / classifications / R.png
#modified:haystack / static / images / classifications / X.png
#modified:haystack / templates / base.jinja2
#modified:haystack / templates / base_page.jinja2
#modified:haystack / templates / search.jinja2
#修改:haystack / templates / search_results_episodes.jinja2
#修改:haystack / templates / view_episode.jinja2
#修改:haystack / templates / view_program.jinja2
#修改:haystack / view.py
#
#未记录的文件:
#(使用git add< file> ...来包含将要提交的内容)
#
#haystack / static / images / classifications / G.pxm
#haystack / static / images / classifications / M.pxm
#haystack / static / images / classifications / MA.pxm
#haystack / static / images / classifications / NA.png
#haystack / static / images / classifications / PG.pxm
#haystack / static / images / classifications / R.pxm
#haystack / static / images / classifications / X.pxm
#haystack / static / images / haystack_logo.png
#haystack / static / images / test_key_art.jpg
#haystack / static / images / test_thumbnail.jpg
#haystack / templates / view_asset.jinja2
#haystack / templates / view_assets.jinja2
没有更改添加到提交(使用 git add和/或git commit -a)
(256)
通过这个消息, git
告诉你你的本地提交树在github.com的repo之前。
github中的回扣您的本地
Y < - +
| |提前2次提交
Z < - +
|
commit A< ----------------> A
| \ | \
B D B D
| / | /
C C
| |
看起来这是 git status
的输出。您可以对> git add
对 stage区域
的更改进行更改,然后使用 git commit -m your message
将此代码提交到本地存储库。
如果您想将工作恢复到 github.com
,使用 git push
。
Using the GitHub application on Mac (not the cli), I have this error which I don't really understand and don't know how to fix. I know its an error because the application throws up a window that says "GitHub Error". I need to commit the changes to the files listed below, but GitHub won't let me. When I press the Commit button, the error appears and it seems I can't do anything to fix it. Any help would be great.
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: .gitignore
# modified: haystack.egg-info/SOURCES.txt
# modified: haystack/__init__.py
# modified: haystack/search.py
# modified: haystack/static/css/layout.css
# modified: haystack/static/images/classifications/G.png
# modified: haystack/static/images/classifications/M.png
# modified: haystack/static/images/classifications/MA.png
# modified: haystack/static/images/classifications/PG.png
# modified: haystack/static/images/classifications/R.png
# modified: haystack/static/images/classifications/X.png
# modified: haystack/templates/base.jinja2
# modified: haystack/templates/base_page.jinja2
# modified: haystack/templates/search.jinja2
# modified: haystack/templates/search_results_episodes.jinja2
# modified: haystack/templates/view_episode.jinja2
# modified: haystack/templates/view_program.jinja2
# modified: haystack/view.py
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# haystack/static/images/classifications/G.pxm
# haystack/static/images/classifications/M.pxm
# haystack/static/images/classifications/MA.pxm
# haystack/static/images/classifications/NA.png
# haystack/static/images/classifications/PG.pxm
# haystack/static/images/classifications/R.pxm
# haystack/static/images/classifications/X.pxm
# haystack/static/images/haystack_logo.png
# haystack/static/images/test_key_art.jpg
# haystack/static/images/test_thumbnail.jpg
# haystack/templates/view_asset.jinja2
# haystack/templates/view_assets.jinja2
no changes added to commit (use "git add" and/or "git commit -a")
(256)
By this message, git
tells you that your local commit tree is ahead of repo in github.com.
Repo in github Your local
Y <-+
| | ahead of 2 commits
Z <-+
|
commit A <----------------> A
| \ | \
B D B D
| / | /
C C
| |
Seems this is output of git status
. You can just git add
your changes to stage area
, and then use git commit -m "your message"
to commit this code to your local repository.
If you want to put your work back to github.com
, use git push
.
这篇关于Git分支领先于原点/主控的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!