[RFC] git clone add option to track all remote branches
- From
- Yubin Ruan <ablacktshirt@gmail.com>
- Date
- Apr 2, 2018, 01:50 UTC
- Message-ID
- <20180402015035.mzgye6apwn3igch5@HP>
Hi,
I am writing to ask that whether or not you think will be appropriate to add an option to "git clone" so that whenever a repo is cloned, branches are created automatically to track corresponding remote branches. (or is there any equivelant option?)
You can obviously do this by a bash command like this
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; donebut it will be better if we can have an option in "git clone".
Regards, Yubin