例如,这是我本地存储库中分支的状态:
14:56:15 /srv/www/gamersmafia/current[max-decisiones]$ git status
# On branch max-decisiones
# 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: app/controllers/respuestas_controller.rb
# modified: app/helpers/application_helper.rb
# modified: app/models/decision.rb
# modified: app/models/gm_portal.rb
# modified: app/models/term.rb
# modified: app/views/respuestas/index.html.erb
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# app/assets/stylesheets/old/sprites/games_sprites.css
#
如果我想添加文件来提交它们,我必须写入文件的路径,或者在写入后选择并粘贴git add
。
有没有更快的方法来使用 git 选择要添加、结帐等的文件?例如,如果我只想为 commit 添加 2 个文件?