How to add files to be committed in a faster way?

git

Solution

You could just add them (also the newly created files) with:

git add -A .

And then commit. If you want to just add some of them you can use add interactively:

git add -i

`git` will ask for what files you want to add. If you're using linux or a mac you can create an alias in your shell to make the command shorter and so even faster.

Another solution is to use a wrapper for your editor/IDE. You can find a wrapper for almost any developing tool (from eclipse to VIM). This wrappers usually let you perform some actions quickly, just like `add` or `commit` the file your editing. You can file a complete list in the git wiki.

Problem

For example, this is the status of a branch in my local repository: ``` 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 # ``` If I want to add files to commit them, I have to write the path to the file, or select and paste it after writing `git add`. Is there a faster way to work with git selecting files to add, checkout, etc? For example, if I just want to add 2 files for commit?

Original source