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.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs