I have url like this https://git.company.com/project . I am trying to write a shell script which tries to fetch all the repositories of a given Project. Additionally, I want to find the commit history of all those repositories under that project. what is the way to write a shell script for the same?
previous_branch=remotes/origin/release/${Previous_Release_Number}
current_branch=remotes/origin/release/${Present_Release_Number}
git log --pretty=format:"%ae, %s, %cd" ${previous_branch}..${current_branch} |sort> output.csv
This I have written for single repository.
I assume by repositories
you are talking about remotes of that repository.
Git fetch has several options you can use, one of them being --all
which would then fetch updates from all remotes
:
git fetch --all
Happy to extend my answer if you provide more information about what you want to do exactly.
Cheers,
Dominic
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.