How to restore a deleted branch in CodeCommit ?

4

Hi, Like Github, is there a way to restore a deleted branch in CodeCommit ?

thiru
gefragt vor einem Jahr1310 Aufrufe
1 Antwort
1
Akzeptierte Antwort

When you delete a branch from the console, there is a message that says:

Deleting a branch from AWS CodeCommit cannot be undone from the console. However, users might continue to have a copy of this branch in their local repositories until the next time they pull changes.

Do you have a local copy ? if so you can find the SHA for the last commit of your deleted branch using: git reflog and restore the branch using git checkout -b <branch> <sha>.

profile pictureAWS
EXPERTE
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen