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?")