diff --git a/pull_requests.py b/pull_requests.py index bfea0e1..62b5885 100644 --- a/pull_requests.py +++ b/pull_requests.py @@ -72,7 +72,7 @@ def ensure_full_history(repo_path: str) -> None: def reset_repo_to_latest_commit(repo_path: str) -> None: current_branch = run_git_cmd(["rev-parse", "--abbrev-ref", "HEAD"], repo_path).stdout.strip() - run_git_cmd(["checkout", current_branch], repo_path) + run_git_cmd(["reset", "--hard", current_branch], repo_path) def process_pull(repo: Repository, pr: PullRequest, dataset: Dataset, repos_dir: str): commits = list(pr.get_commits())