Do any of you git gurus have a script that will help with folks new to git manage their local and remote-tracking branches. Proponents of distributed version control may scoff at this idea, but I believe it will help ramp people up on git.
I’m looking for a script that will:
- Create a local branch for every new remote branch (with the same name)
- Prune remote-tracking branches for remote branches that no longer exist
- Delete local branches for those pruned remote branches (ask user for confirmation if local branch was ahead of remote)
We use a central git repo that all developers push/pull from/to. So, we want git to function more like SVN (but with better merging capabilities).
Bonus if you can get this to work with Git Extensions from the GUI.
Implemented as a Git Extensions plugin. https://github.com/gitextensions/gitextensions/pull/1451