How to restore a deleted branch in CodeCommit ?

4

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

thiru
demandé il y a un an1310 vues
1 réponse
1
Réponse acceptée

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
EXPERT
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions