How to avoid specifying absolute file path while git-add

前端 未结 6 687
名媛妹妹
名媛妹妹 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:23

    I believe you can just say "git add DSManger.java" if your terminal window is currently cd into the proper folder (src_test/com/abc/product/server/datasource/manager/aats). So just do:

    cd src_test/com/abc/product/server/datasource/manager/aats
    git add DSManger.java
    

    Otherwise, I can't think of any other way unless you make a separate repo.

提交回复
热议问题