【发布时间】:2025-11-30 19:40:01
【问题描述】:
使用 Mac 上的 GitHub 应用程序(而不是 cli),我遇到了这个我不太了解且不知道如何修复的错误。我知道这是一个错误,因为应用程序会弹出一个显示“GitHub 错误”的窗口。我需要提交对下面列出的文件的更改,但 GitHub 不会让我这样做。当我按下 Commit 按钮时,会出现错误,似乎我无法修复它。任何帮助都会很棒。
# 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)
【问题讨论】:
-
为什么你认为这是一个错误?它的
git status!并且可能也会在成功提交后出现 -
请在此问题中添加您如何编写
git commit命令。 -
这是一个错误吗?这似乎只是信息。
Your branch is ahead of 'origin/master' by 2 commits表示您在本地分支中有两个提交,尚未推送到远程分支。请告诉我们您什么时候收到错误,使用的 git 命令是什么,错误信息是什么? -
我已经澄清了这个问题