Created
October 3, 2023 10:29
-
-
Save jonathanschilling/ae8f5545ed923a4252d8a6623145ed11 to your computer and use it in GitHub Desktop.
Make Git fetch all remote branches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Make Git fetch all remote branches. | |
# from https://stackoverflow.com/a/25941875 | |
git config --get remote.origin.fetch | |
# +refs/heads/master:refs/remotes/origin/master | |
# --> only fetches master !!! | |
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" | |
git config --get remote.origin.fetch | |
# +refs/heads/*:refs/remotes/origin/* | |
# --> now fetches all branches ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment