Reputation: 4425
When deleting a branch from remote and local other people working in that repo
are affected. If someone has the deleted branch local I guess they can push it back right?
How is this syncing handled?
Upvotes: 0
Views: 98
Reputation: 1212
When deleting a branch from remote and local other people working in that repo are affected. If someone has the deleted branch local I guess they can push it back right?
Yes, someone else who has the local branch, which got deleted in the remote, can push it to remote.
Git commit hash is actually a hash of the commit object that contains information including the hash of the commit before it. That is how the git commit history is generated.
Other people who also has the local branch will just need to set their remote tracking branch to the new "restored" branch, using the command:
git branch branch_name -u your_new_remote/branch_name
Upvotes: 1