Steven Lu
Steven Lu

Reputation: 43427

Git: Why are local branches pushed to remote automatically but require manual deletion after they are deleted locally?

Please correct me if any of my assumptions seem to be wrong.

Upvotes: 1

Views: 43

Answers (1)

Amber
Amber

Reputation: 526583

Because creating a branch is not a destructive operation. Deleting one is.

It's generally "safe" to create a branch on the remote - nothing is depending on a branch that wasn't there. It's not safe to delete a branch, though - other people might be using it, or some tool might be monitoring it, or whatever.

Upvotes: 2

Related Questions