【发布时间】:2015-07-12 20:54:01
【问题描述】:
我需要在 Windows 上使用 git bash 在 git 上提交一些东西,例如:
1.git add *
2.git commit -m "Commit test"
3.git push origin master
以这种方式我提交所有更改。我只想添加特定文件(*.h 和 *.cpp)。解决方案是使用:
ad. 1.:
git add *.h
git add *.cpp
但是以这种方式,我只在当前文件夹中添加 *.h 和 *.cpp。问题是如何在一个命令中在当前文件夹和子文件夹中添加文件 *.h 和 *.cpp? 比如:
1.git add *.h and *.cpp and_in_subfolders
and then:
2.git commit -m "Commit test"
3.git push origin master
谢谢。
【问题讨论】: