lllyasviel commited on
Commit
9dc073b
1 Parent(s): 652f048
Files changed (1) hide show
  1. entry_with_update.py +1 -0
entry_with_update.py CHANGED
@@ -33,6 +33,7 @@ try:
33
  local_branch.set_target(remote_commit.id)
34
  repo.head.set_target(remote_commit.id)
35
  repo.checkout_tree(repo.get(remote_commit.id))
 
36
  print("Fast-forward merge")
37
  elif merge_result & pygit2.GIT_MERGE_ANALYSIS_NORMAL:
38
  print("Update failed - Did you modified any file?")
 
33
  local_branch.set_target(remote_commit.id)
34
  repo.head.set_target(remote_commit.id)
35
  repo.checkout_tree(repo.get(remote_commit.id))
36
+ repo.reset(local_branch.target, pygit2.GIT_RESET_HARD)
37
  print("Fast-forward merge")
38
  elif merge_result & pygit2.GIT_MERGE_ANALYSIS_NORMAL:
39
  print("Update failed - Did you modified any file?")