Pregunta

I am working in an environment where every contributer basically uses their own branch for basically everything new they make. Therfore we get about 10 new branches a month. I do not know how the branches are going to be named but I'd still like to have them all. So far I am only able to track the branches I know the name of.
This basically translates as: I want to automatically craete all remote branches locally!

Is there a simple solution to this problem?

I use the GitHub GUI for windows and the console. I'm not afraid to use any of the two. But I would prefer a solution that uses simple methods of the GitHub GUI. If there aren't any I won't mind the normal console solutions.

¿Fue útil?

Solución

Fetching from a remote will load all branches that exist on that remote:

git fetch <remote>

They will all be added as remote branches (basically <remote>/<branchname>) and won’t exist as local branches until you create them directly. This also helps to not clutter the git branch output, although you can still list all remote branches using git branch -r.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top