From e45fd3575c06161c15d3b4f280721a31b8ecc166 Mon Sep 17 00:00:00 2001 From: lvmin Date: Fri, 11 Aug 2023 09:48:59 -0700 Subject: [PATCH] i --- entry_with_update.py | 1 + 1 file changed, 1 insertion(+) diff --git a/entry_with_update.py b/entry_with_update.py index 8b20b14..c519880 100644 --- a/entry_with_update.py +++ b/entry_with_update.py @@ -33,6 +33,7 @@ try: local_branch.set_target(remote_commit.id) repo.head.set_target(remote_commit.id) repo.checkout_tree(repo.get(remote_commit.id)) + repo.reset(local_branch.target, pygit2.GIT_RESET_HARD) print("Fast-forward merge") elif merge_result & pygit2.GIT_MERGE_ANALYSIS_NORMAL: print("Update failed - Did you modified any file?")