Is it safe to delete a branch from a github fork once it's been merged upstream?

Solution 1:

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.

Solution 2:

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.