0
Good afternoon,
I have a repository on Github with a main branch, and the idea is that with each new Feature, this is done from a new branch, which at the end should be merged with the main branch, through the merge.
But the question is, if it is possible, after merging, to disable that branch, but not to delete it.
Example:
git checkout -b novaFeature
Made the change and then
git commit -m "Nova Feature"
git push origin novaFeature
git checkout main
git merge novaFeature
Until then everything is fine, except that if every new Eature, if it is done, will generate a lot of branchs that in my view can end up polluting and messing up the repository.
I wanted to know if there is any way to after merge the branch is inactive, but not delete it.
My first time posting here, I hope I managed to ask the question correctly.
Hug to all of you!
If you don’t want to delete the branch, just don’t touch it anymore. But if you don’t want them to stay in the repository, delete :-)
– hkotsubo
This answers your question? How to delete a branch(branch) from local and remote Git?
– Pedro Sanção
@hkotsubo, it makes sense.
– andrecursino
@Pedrosanção I took a look at this link, but I didn’t want to exclude, I believe it would be something closer to Ruan Montelo’s answer, maybe to stop a branch from receiving pushes.
– andrecursino