Reputation: 810
I have many different repos residing in the same directory (about 20). I would like to stay up-to-date with the rest of my team and perform a "git pull" for all of the repos at every morning.
Is there a faster way than doing a "right-click -> git sync -> pull" for every single repo?
Upvotes: 6
Views: 2828
Reputation: 1217
Create a *.bat\cmd file, add paths to your GITS:
"C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe" /command:pull /path:"c:\YourGitPath\" "C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe" /command:pull /path:""c:\YourGitPath2\"
This will open GUI one by one.
Upvotes: 0
Reputation: 7397
As of TortoiseGit 2.12.0 you can select several folders and right-click to choose "Git Pull .." - this will run the "Git Pull" dialog for all the folders in succession.
Upvotes: 0
Reputation: 31
Here is my script to sync all repositories within a folder:
@echo off
pushd %~dp0
for /d %%d in ("*") do (
pushd %%d
if exist ".git" tortoisegitproc /command:sync /closeonend:1
popd
)
popd
Given a directory structure like this:
tortoise-sync-all will iterate through all subdirectories which have a .git folder inside, and issue the sync command one after another.
Upvotes: 2
Reputation: 20376
No, as of TortoiseGit 1.8.5. You have to pull all repositories many times.
But you can suggest this as an enhancement in TortoiseGit's issue tracker.
Upvotes: 3
Reputation:
If your team's repos are all forks of a single canonical repo, and your local repo is another clone, then just add each team member's fork as a remote, then use git fetch
with the --all
flag from the command line:
git remote add coworker1 <fork-url>
git remote add coworker2 <fork-url>
# ...
git fetch --all
You might be able to fetch all of the remotes using TortoiseGit too, but I'm not sure.
Upvotes: 1