How to restore a deleted branch in CodeCommit ?

4

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

thiru
已提問 1 年前檢視次數 1310 次
1 個回答
1
已接受的答案

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
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南