Sudhanshu Gupta
Sudhanshu Gupta

Reputation: 2315

Delete remote branch accidentally

I have a remote branch which i checkout out just now. I want to delete some other branch but accidentally deleted "Development" branch.

git push origin :Development

Now i tried to get it back by this command

git push origin head

is this the same as

(git push origin Development :Development)

Will this have any impact ? Any other thing that i need to do in order to remain this brach same as previous.

One Impact I have seen:-

All pull requests were declined which were not approved before deletion.

Do we have to send pull request again.

Upvotes: 3

Views: 145

Answers (1)

VonC
VonC

Reputation: 1323313

Will this have any impact ?

If your local development branch was up-to-date, there won't be any impact.
The remote repo will recover that branch with its history intact.

The only way the new remote branch would defer from the one deleted is that you changed its history locally (like with a rebase)

Upvotes: 2

Related Questions