Skip to content

Deleting a branch after a squash and merge on GitHub also deletes its commits #21689

Discussion options

You must be logged in to vote
My history now looked like that:

What history view do you mean by “My history”?

Anyway, I think this is intended behaviour. By squashing you push all commits of that branch into a single commit, then apply that commit to the master branch. I also believe that with “Delete this branch” GitHub  does mean “Delete this branch’s commits”. Actually, I’ve never considered a branch as just a pointer to a commit, but that might as well be true (I am not a Git wizard 😉 ).

where else should I be cautious that the term "branch" is used to mean "the branch's commits

I would be cautious everywhere about that! Again, at least from my experience, a “branch” mostly never is considered as a pointer but m…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants