如何避免在git-add时指定绝对文件路径 [英] How to avoid specifying absolute file path while git-add

查看:426
本文介绍了如何避免在git-add时指定绝对文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 git add 命令在文件路径变得冗长时变得乏味。对于例如
git add src_test / com / abc / product / server / datasource / manager / aats / DSManger.java

是否有可能绕过指定绝对文件路径?可能会使用某种模式或某些东西?
$ b

我知道我们可以使用 git gui 。但我想用cmd行来做。



预先感谢你的意见。

对于类似unix的系统,您可以始终使用星标指向文件,例如

  git add * DSManager .java 

将会包含所有DSManager.java文件,git可以从您当前的工作开始目录。


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.

解决方案

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.

这篇关于如何避免在git-add时指定绝对文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆