I have a library of shared repos used in several projects, and I often need to perform git pull on some/all of them to make sure each project has an updated library.
In the Repository Browser view, I can see which ones have new commits and am able to select multiple repos. Upon right-click, there is an option for "Custom Actions" which seems like a good place for bulk git pull on all selected repos. However, I couldn't find a way to add such a custom action. Could you point me in the right direction to achieve this?
If it's not possible from the Repo Browser, what would you recommend as a solution to git pull multiple repos all at once, rather than one by one?
Thank you for the response. The link doesn't provide any solution unfortunately, only that it's not recommended to bulk git pull. I need a workable solution still, since it's not really practical to git pull 4~5 repos one at a time for each project. Submodules could solve this, although this feature has brought other issues for me in the past. Subtree might work well to update all shared repos for each project. I did find a way to add a Custom Action, and I remember seeing a bash script that goes through a directory, finds all repos and performs git pull. If I find a solution, I'll post back here for other people in a similar situation.
@Daniel Willitzer This is what I'm using currently, a line in ~/.bash_profile: alias git-update='for dir in ./*; do (if test -d "$dir/.git"; then echo "Updating $dir.." && cd "$dir" && git pull; fi); done' It runs git pull on all folders with a git repo, under the current working directory.
Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events