2013-08-05 31 views
1

在使用GitHub上的Mac,我发现了以下错误框,当我尝试提交我的承诺:错误的Mac问我使用终端“混帐添加”

# On branch Integrating-a-recommendations-textbox 
# 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: assets/app/scripts/templates/popups/recommend.hbs 
# modified: web/wgwt/models.py 
# modified: web/wgwt/views.py 
# 
no changes added to commit (use "git add" and/or "git commit -a") 
(1) 

我看着在其他一些问题,例如在这里:GitHub for Mac: Can't commit and sync or just commit because I have to add files before

但我不想使用终端作为解决方法,我想提交使用GitHub for mac。重新启动我的机器没有帮助。我可以在GitHub for Mac更改选项卡中看到我对绿色文件添加的内容,但似乎无法通过此错误。谢谢你的帮助!

+2

的消息说,使用“混帐加”。你尝试过吗? –

+0

我正在使用GitHub for Mac应用程序,所以在任何地方都没有该选项。我遵循GitHub for Mac支持文档的指示。错误信息是一个小小的对话框,打印出我期望在终端中的内容,是否使用终端进行提交。 – YPCrumble

+0

嗯,我没有专门用于Mac的GitHub,但它看起来像这个页面有你需要的信息:https://help.github.com/articles/making-changes也许你需要选择文件,然后再尝试承诺它,或者其他什么。 –

回答

1

我明白,你想用你的GitHub的Mac GUI,但如果你要提交通过终端来代替,在这里你的变化是,你会做什么:

# Get the status of your working copy: 
$ git status 
# On branch Integrating-a-recommendations-textbox 
# 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: assets/app/scripts/templates/popups/recommend.hbs 
# modified: web/wgwt/models.py 
# modified: web/wgwt/views.py 
# 

# Add each file you want to commit individually: 
$ git add web/wgwt/models.py 

# Or add them all at once: 
$ git add "*" 

# Make your commit 
$ git commit 

# You can also use the `--all` or `-a` flags during the commit 
# to add all **tracked/modified** files (but not untracked files) 
$ git commit -a 

# To push the new commits to a remote repo, use the following: 
$ git push <remote-name> head 
+0

这工作 - 我只需要确保我在正确的目录“cd/web/wgwt”,我能够做到这一点。还需要学习一些如何使用“$ git commit -m”提交提交消息。“并且这也起作用了。谢谢! – YPCrumble

+0

@YPCrumble很高兴我的信息能够帮助你。如果你认为我的答案另外,如果你想学习如何在命令行中使用Git,我推荐[免费的在线Pro Git书](http:// git-scm)。 com/book),第1-3章和第6-6.5章,还要确保你学会了如何以交互方式和非交互方式“rebase”,你可能会使用它很多 – 2013-08-05 05:06:11

+0

:)谢谢,一旦我得到足够的声望upvote我会! – YPCrumble