3

I have forked from an upstream project that has hundreds of branches on it. Is it safe to delete those branches from my fork? Is there a better way to remove those branches from the fork? I do not need any of these branches and the hundreds of branchs on our upstream is just a bunch of noise that I would like to remove from the forked repo.

1 Answers1

2

Note: I know this is old question, just adding related links to other question for people who accidentally stumble upon this page.

Solutions:

You can delete the unneeded branches which came from upstream repository, it is totally safe as you rebase you forked repo with upstream repo later as well.

You may find more information here : deleting a branch after merge

Now you can delete your branch from remote as well local repo using this command:

git push --delete <remote_name> <branch_name>
git branch -d <branch_name>

Credit:

If you want more detailed answer please visit here :

How do I delete a Git branch both locally and remotely?

rahulkesharwani
  • 328
  • 3
  • 17