diff --git a/packages/hagrid/hagrid/lib.py b/packages/hagrid/hagrid/lib.py index 0625dcef4d9..5c92e6f5a7a 100644 --- a/packages/hagrid/hagrid/lib.py +++ b/packages/hagrid/hagrid/lib.py @@ -217,6 +217,7 @@ def update_repo(repo: git.Repo, branch: str) -> None: try: if repo.is_dirty(): repo.git.reset("--hard") + repo.remotes.origin.fetch() repo.git.checkout(branch) repo.remotes.origin.pull() console.print(f"{OK_EMOJI} Updated HAGrid from branch: {branch}") @@ -241,6 +242,7 @@ def use_branch(branch: str) -> None: try: if repo.is_dirty(): repo.git.reset("--hard") + repo.remotes.origin.fetch() repo.git.checkout(branch) repo.remotes.origin.pull() except Exception as e: