This reset
command will undo the add
that happened in the reflog:
myProject/main> reflog
Branch When Hash Description
1. myProject/main 1 secs ago #0d5om21ev5 add
2. myProject/main 9 mins ago #6tfcojje2h delete myProject/main:.deploy
myProject/main> reset #6tfcojje2h
reset
accepts an optional target branch to reset. If no branch is provided, the current branch is reset.
myProject/main> project.reflog
Branch When Hash Description
1. myProject/aBranch 1 min ago #44hhv8v9bk move myProject/aBranch:loadApiKey jobs.loadA...
2. myProject/aBranch 2 mins ago #d4h0k49ng3 delete myProject/aBranch:.deploy
3. myProject/aBranch 2 mins ago #0d5om21ev5 Branch created from myProject/main
4. myProject/main 7 mins ago #0d5om21ev5 add
myProject/main> reset #d4h0k49ng3 /aBranch
Resets a branch of the project (along with its history) to that of the specified hash or numbered argument. This is useful for undoing changes to the project, often used in tandem with reflog
.
Differs from the deprecated reset-root
command in that it only affects the current project, not the entire codebase.