I've only recently tried my hand at forking in github and would like some "best practice" advice.

I created a branch in my fork, and that branch got pulled into master of the upstream project. It no longer appears in the network graph, but it's still there on the github. Is it safe for me to delete this branch on the fork now?

Edit: Just to clarify, I'm checking if this conflicts with github's "don't change history" rule.


2 Answers 2


When you add something to master branch, it's there for good. Merging another branch to master is just adding things from other branch to master.

When you delete that other branch, the history inside the branch is lost if you rebased it. But it does not make much sense anyway, once the changes are in the master branch.

So, you can safely delete your branch if you don't want to continue development within it.


If you're worried about upstream's code magically disappearing if you delete your branch, don't. Once they pull it, it's there (more or less) for good.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.