简体   繁体   中英

git list all active branches of all the repos contained in a local folder

I cloned a bunch of git repos on another let's say laptop, but now my application which requires all of them doesn't work the same as on the initial laptop.

Assuming on the initial one all the repos are located in the folder ~/ , is there any command to list the active branch of each package in this folder ?

Regards

findgit branch合并,并使其打印git repo目录和当前分支名称。

find /path/to/root/folder -type d -name '.git' -exec echo {} \\; -exec git -C {} branch \\;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM