I'm a windows / svn person trying to learn to use GIT by command line. I'm using a basic add . /commit/push cycle, and I typically try to add all changed files, so I don't care. But every once in a while I want to add just some of the changed files. I don't enjoy typing the usually long full paths (java....) and I know I could use characters like * to match multiple files... but I found no way to know in advance what files will be affected.
As an example, if I make a git status
, I got 3 files,
modified: myrepo/src/main/java/com/mycompany/myproject/helper/WordBuilder.java
modified: myrepo/src/main/java/com/mycompany/myproject/helper/WordBuyer.java
modified: myrepo/src/main/java/com/mycompany/myproject/helper/WordDeleter.java
I want to add just files WordBuilder and WordBuyer, so instead of typing git add .
I want to type something that matches them and excludes WordDeleter (example is not great)
. Lest say I want to try git add WordB*
, I want to know before actually typing it what files will be added to be sure I'm not omitting or including anything by mistake.
Is this possible?
EDIT: More details I forgot: I'm using Windows7, GIT command line via msysGit/GIT for windows