Using git add
command becomes tedious once the file path becomes lengthy. For e.g. git add src_test/com/abc/product/server/datasource/manager/aats/DSManger.java
Is it possible to bypass specifying absolute file path? May be using some kind of pattern or something?
I know that we can use git gui
. But I want to do it using cmd line.
Thanks in advance for the inputs.
adds both tracked and untracked files. Let's demonstrate this, by creating a file in the current directory as well as a file in a sub-directory. Now let's change into the sub-directory and run git add . If we run git status , we'll notice only the file in the sub-directory was added.
The git add command adds new or changed files in your working directory to the Git staging area. git add is an important command - without it, no git commit would ever do anything.
For unix-like systems you can always use the star to point to files, e.g.
git add *DSManager.java
will include all DSManager.java files git can find within your source tree starting in your current working directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With