1

在使用 GitHub for 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 更改选项卡中看到我对绿色文件所做的添加,但似乎无法克服此错误。谢谢你的帮助!

4

1 回答 1

1

我了解您想使用 GitHub for 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
于 2013-08-05T03:53:41.167 回答