Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

how to clean [gitflow ...] in .git/config file in a right way #459

Open
duckscofield opened this issue Jun 11, 2021 · 3 comments
Open

how to clean [gitflow ...] in .git/config file in a right way #459

duckscofield opened this issue Jun 11, 2021 · 3 comments

Comments

@duckscofield
Copy link

duckscofield commented Jun 11, 2021

I found some information, via use git config --list in my project repo.

...
[gitflow "branch.feature/addMRTemplates"]
	base = develop
[gitflow "branch.feature/followUIDevRule"]
	base = develop
...

These branches are not any longer exist. May I delete them all directly? Or there is CMD for clean?

@jkankiewicz
Copy link

jkankiewicz commented Jul 16, 2021

This is related to #407 and #463 in that there should be a corresponding git flow command for every vanilla git command that can potentially invalidate the "[git flow ...]" sections within the .git/config file.

For example, the git flow delete and git flow finish commands would have cleaned up those configuration sections automatically but, because there are no git flow {bugfix,feature,hotfix,support} move/rename <name> commands, one is forced to instead use the vanilla git branch -m <old-branch> <new-branch> command which would leave them behind.

@Shea690901
Copy link

I propose a git flow cleanup that walks over those entries and removes them from the config file if the corresponding branches no longer exist...

@jkankiewicz
Copy link

I propose a git flow cleanup that walks over those entries and removes them from the config file if the corresponding branches no longer exist...

@Shea690901, that's a great idea because there's no way to prevent someone from using a vanilla git command even when there's a gitflow counterpart for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants