>>> "UB" == Uwe Brauer <o...@mat.ucm.es> writes: >> So I think my question boils down, when and how do I obtain a local copy >> of a remote branch in order to do some changes and push them.
> * bug-fix > feature > main > remotes/origin/HEAD -> origin/main > remotes/origin/bug-fix > remotes/origin/feature > remotes/origin/main > Now the last listing is what I would expect as a default behavior. I > obviously downloaded all the branches > git branch -a > Shows me these branches indicating with * which is checkout. > So why on earth can't this be the behavior after cloning, or is there > any option in cloning that would lead to all branches listed, if so, why > isn't this the default behavior? The following script (replace master by main if necessary) https://gist.github.com/wilmarvh/95fe7daed6ee6a63d811677e040ae421#file-git-checkout-all-branches-sh Does the job. It should be part of git cloning, at least optionally. -- Warning: Content may be disturbing to some audiences I strongly condemn Putin's war of aggression against the Ukraine. I support to deliver weapons to Ukraine's military. I support the ban of Russia from SWIFT. I support the EU membership of the Ukraine. https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/ -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/87k03v1c98.fsf_-_%40mat.ucm.es.
smime.p7s
Description: S/MIME cryptographic signature