Timeline for How do I clone all remote branches?
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 1, 2023 at 20:56 | comment | added | Devin Rhode |
I'm not sure how this approach would be modified to account for submodules. Speaking of --recurse-submodules , you can also pass this same cli option into git clone , however, the option is ignored if you are using --mirror . (see docs: git-scm.com/docs/git-clone#Documentation/…) Maybe this approach could use some sort of git submodule foreach 'do clone --mirror' --recursive script to do a recursive mirror clone? git-scm.com/docs/git-submodule#Documentation/…
|
|
Feb 1, 2023 at 8:34 | comment | added | Andry |
Why not instead of reset do git checkout --recurse-submodules ? Isn't it more "full" backup than just reset a single repo?
|
|
Oct 7, 2022 at 8:19 | comment | added | Scopperloit |
If the intention is to create a full copy of the repository with all branches locally, this should be considered the correct answer. A git reset ---hard is nothing more than discarding any changes since last commit, then setting HEAD to that commit. Not really scary at all. Ref: git-scm.com/docs/git-reset
|
|
Jun 24, 2022 at 3:36 | history | edited | Devin Rhode | CC BY-SA 4.0 |
warning: about using a git clone --mirror repo in your day-to-day work.
|
Jun 17, 2022 at 14:27 | history | edited | Devin Rhode | CC BY-SA 4.0 |
note about using repo day-to-day
|
Feb 20, 2022 at 22:57 | history | edited | Devin Rhode | CC BY-SA 4.0 |
add note about how to search git history
|
Feb 20, 2022 at 21:51 | comment | added | Francesco Orsi | I admit I'm not really understanding how it works, but compared with the other solutions, it is the only one working, it downloads all the branches locally in few lines of commands, thanks | |
Dec 8, 2021 at 23:55 | comment | added | Devin Rhode | As this is a new directory with a fresh clone, I don't see how it's scary. | |
Dec 8, 2021 at 23:50 | history | edited | Devin Rhode | CC BY-SA 4.0 |
Elaborate on purpose and usage; Post Made Community Wiki
|
Dec 8, 2021 at 23:38 | comment | added | Peter Mortensen |
git reset --hard looks scary. What is all this supposed to do? An explanation would be in order. E.g., what is the idea/gist? Please respond by editing your answer, not here in comments (without "Edit:", "Update:", or similar - the answer should appear as if it was written today).
|
|
Jul 29, 2021 at 20:19 | history | answered | Devin Rhode | CC BY-SA 4.0 |