for example, I have the following Branches:
- main -> tracking origin/main
- feature/f1 -> tracking origin/feature/f1
- feature/f2 -> tracking origin/feature/f2 and in .gitconfig
[ remote "origin"]
url = ...
fetch = +refs/heads/*:refs/remotes/origin/*
now I only want to see the feature-branches, therefor update .gitconfig to:
[ remote "origin"]
url = ...
fetch = +refs/heads/feature*:refs/remotes/origin/feature/*
Is there any way to remove the local stored main branch, without deleting it on the remote server?
You can delete any local branch at any time. This does not do anything to the remote branches.
Just DO NOT
push
a delete command to your remote.