【发布时间】:2014-08-09 21:44:40
【问题描述】:
在我的网络服务器上,我喜欢在 /etc/apache2 等各种配置文件夹中创建 git repos,这样我就可以跟踪我对配置文件所做的更改。随着我安装更多服务,如 proftpd、fail2ban、postfix 等,我向每个文件夹添加了更多 git repos。
在这一点上,我不记得他们都在哪里。打字少
find . -type d -iname ".git"
有什么方法可以搜索某个目录中的所有 git 存储库,并 加分,显示分支及其干净/脏状态?比如:
./etc/apache2/.git [master*]
./etc/proftpd/.git [master*]
./etc/fail2ban/.git [master]
./etc/postfix/.git [master]
星号表示仓库有未提交的更改。
【问题讨论】:
标签: linux git repository