| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A lightweight pair of scripts (Bash & PowerShell) to recursively fetch, stash, and pull updates for all Git repositories within a directory. Perfect for developers and QA engineers managing dozens of repos / projects.
git-sync-all
├── LICENSE
├── README.md
├── fans.sh // Alias script for "Fetch All, No Stash, and Pull" in Bash
├── faws.ps1 // Alias script for "Fetch All, Stash, and Pull" in PowerShell
└── faws.sh // Alias script for "Fetch All, Stash, and Pull" in Bash
⇡ Return to the Table of Contents
The scripts iterate through every subdirectory in their current location. If a .git folder is detected, it performs the following sequence:
⇡ Return to the Table of Contents
⇡ Return to the Table of Contents
Give the script execution permissions:
chmod +x faws.shRun it:
./faws.sh⇡ Return to the Table of Contents
Give the script execution permissions:
chmod +x faws.shRun it:
./faws.sh⇡ Return to the Table of Contents
Open your terminal (PowerShell or Terminal) and Run the script:
./faws.ps1Note: On Windows, if you get a script execution error, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser⇡ Return to the Table of Contents
No MS Windows environment – Install and run PowerShell on macOS
Install PowerShell
There are two ways to do this via Brew. I recommend the formula method as it's often more "terminal-friendly" on macOS:
brew install powershellNote: If that doesn't work, try --cask instead
brew install --cask powershellRun PowerShell
- Once installed, type the cross-platform command pwsh to open PowerShell.
- You’ll see the prompt change to PS /Users/yourname>.
- Run ./faws.ps1 to execute the script.
- To exit: Type exit.
- Alternatively run pwsh ./faws.ps1 from a terminal, and it will run the script with PowerShell.
⇡ Return to the Table of Contents
To run this from anywhere on your machine, add an alias to your profile (.zshrc, .bashrc, or $PROFILE).
alias update-all='~/path/to/your/script/faws.sh'⇡ Return to the Table of Contents
alias update-all='~/path/to/your/script/fans.sh'⇡ Return to the Table of Contents
Set-Alias -Name gup -Value C:\path\to\faws.ps1⇡ Return to the Table of Contents
Click to expand! jjbadenhorst:Git-demo % ./faws.sh
Starting bulk update with auto-stash...
--------------------------------------------
Updating: ./awesome-mcp-servers
Already up to date.
--------------------------------------------
Updating: ./badj
Already up to date.
--------------------------------------------
Updating: ./cypress-checkout-test
Local changes detected: Stashed.
Already up to date.
Re-applying local changes...
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: cypress.config.js
modified: cypress/fixtures/testdata.json
deleted: e2e/cypress-checkout-test.cy.js
deleted: fixtures/testdata.json
deleted: support/commands.js
deleted: support/e2e.js
deleted: support/selectors.js
Untracked files:
(use "git add <file>..." to include in what will be committed)
.DS_Store
cypress/.DS_Store
cypress/reports/
cypress/screenshots/
cypress/videos/
node_modules/
package-lock.json
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (f71a404883ffe2d7e47b0b0d245fb1f0c2cc2344)
--------------------------------------------
Updating: ./cypress-cucumber-poc
Already up to date.
--------------------------------------------
Updating: ./cypress-realworld-app
Local changes detected: Stashed.
Already up to date.
Re-applying local changes...
On branch develop
Your branch is up to date with 'origin/develop'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .env
modified: data/database-seed.json
modified: data/database.json
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (470e7319fe99ccc9cdaba286135b1f04d06d3abc)
--------------------------------------------
Updating: ./hashiqube
Already up to date.
--------------------------------------------
Updating: ./mcp-appium-server
Local changes detected: Stashed.
Already up to date.
Re-applying local changes...
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: README.md
modified: package-lock.json
modified: package.json
modified: wdio.android.conf.ts
modified: wdio.conf.ts
modified: wdio.ios.conf.ts
Untracked files:
(use "git add <file>..." to include in what will be committed)
chromedriver-mobile/
test/pageobjects/login.page.ts
test/pageobjects/page.ts
test/pageobjects/secure.page.ts
test/specs/test.e2e.ts
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (3ed914a2083a699384c8f31de7cc6ed07c12772e)
--------------------------------------------
Updating: ./repoguard
Already up to date.
--------------------------------------------
All done!
⇡ Return to the Table of Contents
Click to expand! jjbadenhorst:Git-demo % ./fans.sh
Starting bulk fetch and pull...
--------------------------------------------
Updating: ./awesome-mcp-servers
Already up to date.
--------------------------------------------
Updating: ./badj
Already up to date.
--------------------------------------------
Updating: ./cypress-checkout-test
Already up to date.
--------------------------------------------
Updating: ./cypress-cucumber-poc
Already up to date.
--------------------------------------------
Updating: ./cypress-realworld-app
Already up to date.
--------------------------------------------
Updating: ./hashiqube
Already up to date.
--------------------------------------------
Updating: ./mcp-appium-server
Already up to date.
--------------------------------------------
Updating: ./repoguard
Already up to date.
--------------------------------------------
Done!
⇡ Return to the Table of Contents
Click to expand! jjbadenhorst:Git-demo % pwsh
PowerShell 7.6.1
PS /Users/jjbadenhorst/Documents/Git-demo> pwsh ./faws.ps1
--------------------------------------------
Updating: awesome-mcp-servers
Already up to date.
--------------------------------------------
Updating: badj
Already up to date.
--------------------------------------------
Updating: cypress-checkout-test
Local changes detected: Stashed safely.
Already up to date.
Re-applying your local changes...
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: cypress.config.js
modified: cypress/fixtures/testdata.json
deleted: e2e/cypress-checkout-test.cy.js
deleted: fixtures/testdata.json
deleted: support/commands.js
deleted: support/e2e.js
deleted: support/selectors.js
Untracked files:
(use "git add <file>..." to include in what will be committed)
.DS_Store
cypress/.DS_Store
cypress/reports/
cypress/screenshots/
cypress/videos/
node_modules/
package-lock.json
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (a10e0cdc665edffaf2105aef262562c5e05f8230)
--------------------------------------------
Updating: cypress-cucumber-poc
Already up to date.
--------------------------------------------
Updating: cypress-realworld-app
Local changes detected: Stashed safely.
Already up to date.
Re-applying your local changes...
On branch develop
Your branch is up to date with 'origin/develop'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .env
modified: data/database-seed.json
modified: data/database.json
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (e64d4c8b46758b42a27f9eaed560de35a0a5a985)
--------------------------------------------
Updating: hashiqube
Already up to date.
--------------------------------------------
Updating: mcp-appium-server
Local changes detected: Stashed safely.
Already up to date.
Re-applying your local changes...
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: README.md
modified: package-lock.json
modified: package.json
modified: wdio.android.conf.ts
modified: wdio.conf.ts
modified: wdio.ios.conf.ts
Untracked files:
(use "git add <file>..." to include in what will be committed)
chromedriver-mobile/
test/pageobjects/login.page.ts
test/pageobjects/page.ts
test/pageobjects/secure.page.ts
test/specs/test.e2e.ts
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (b1c0f01f47d3791a0d6f4948886436957fd94ffa)
--------------------------------------------
Updating: repoguard
Already up to date.
--------------------------------------------
All repositories processed!
PS /Users/jjbadenhorst/Documents/Git-demo>
⇡ Return to the Table of Contents
Found a way to make it faster? (Parallel execution, perhaps?) Feel free to fork and submit a Pull Request!
| Back | FazBrowse Home | New Git URL |