How to avoid specifying absolute file path while git-add

前端 未结 6 677
名媛妹妹
名媛妹妹 2021-01-31 13:43

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.ja

6条回答
  •  隐瞒了意图╮
    2021-01-31 14:17

    With bash, you can set "globstar" (shopt -s globstar) and then do:

    git add **/DSManger.java
    

    to add all files called DSManager.java present below the current directory.

    (**/ matches all directories and subdirectories.)

提交回复
热议问题