Git convention to indicate throw away branches

git, github

Solution

Merging hell begins as C's branch no longer have a common ancestor with his merge target.

Surely A's master branch has an ancestor (in its history) to the deleted branch.

C can push the branch to github where A can pull it again. What's wrong with that? or, C can do the merging/rebase in a new branch (on top of A's master) and, again, let A pull from him.

update (response to comments).

Deleting a branch doesn't actually rewrite history, at least not in a bad way that prevents merging.

I'm assuming person A had this kind of history:

a--b--c--d--e--f--g    master
      |
      x--y--z   experiment

So after deleting the branch, he still has the commits from a to c, probably it looks more like:

a--b--c--d--e--f--g--h--i--j--k    master

Person C presumably has:

a--b--c--d--e--f--g    master
      |
      x--y--z--w--v--q   experiment

This is a perfectly reasonable scenario where merging shouldn't be that bad.

For example, person C can pull from A's master and merge experiment into it.

Problem

Scenario: Person A creates an experimental branch to solve a problem. Person B gets interested and wants to check the code, due to laziness person A pushes to his github rather than configuring his workstation to let person B pull directly from him. A and B is hacking away, person C sees the activity on github and clones, eager to check out whats going on. Meanwhile A and B concludes its a horribly solution and deletes the branch. But person C manages to turn the idea into something great and wants to share. Merging hell begins as C's branch no longer have a common ancestor with his merge target. Im curios to see how this scenario should have been handled. - Is there an accepted naming convention for branches to indicate that - even though pushed - this branch may very well be completely oblitered. A way for person A to indicate that "if you pull from this, I cannot guarantee continued happiness". - Or is there even a way (command) in git that lets me sort of tag branches as throw away? - Is it simply never, regardless of circumstances, accepted to alter a git history if someone could have pulled from it? - Should person A have taken the time to properly configure his workstation to let person B pull directly from him? Thus going in the dark, not letting anyone else know what they are working on. - Maybe the only viable solution is good old fashioned communication; just talk to you peers. And if all else fails, what is the proper strategy for person C in this case? How can the changes be properly applied when your work is done in a disconnected graph?

Original source