Skip to content

Commit 7ede561

Browse files
committed
Revert "fix: reset --hard even in the latest branch"
if a rebase happened without --apply, and then new commits got created, and then --apply was used, the new commits would get lost. This reverts commit d7804b2fbe08eed61ee6ed6471894cff66222f5f.
1 parent cff6cc2 commit 7ede561

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

apply.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ const defaultApplyAction: ActionInsideEachCheckedOutBranch = async ({
3939

4040
console.log({ isFinalCheckout });
4141

42-
// if (!isFinalCheckout) {
43-
await Git.Reset.reset(repo, commit, Git.Reset.TYPE.HARD, {});
42+
if (!isFinalCheckout) {
43+
await Git.Reset.reset(repo, commit, Git.Reset.TYPE.HARD, {});
4444

45-
// if (previousTargetBranchName) {
46-
// execSyncInRepo(`/usr/bin/env git rebase ${previousTargetBranchName}`);
47-
// }
48-
// }
45+
// if (previousTargetBranchName) {
46+
// execSyncInRepo(`/usr/bin/env git rebase ${previousTargetBranchName}`);
47+
// }
48+
}
4949
};
5050

5151
export const getBackupPathOfPreviousStackedRebase = (pathToStackedRebaseDirInsideDotGit: string): string =>

0 commit comments

Comments
 (0)