You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closing this issue should also close #328. Here is the PoC code:
importpygit2# Path to your Git repositoryrepo_path='./path/to/repo'repo=pygit2.Repository(repo_path)
# Fetch updates from the remoteremote_name='origin'remote=repo.remotes[remote_name]
remote.fetch()
# Iterate through the local branches and reset them to the corresponding remote tracking branchforbranchinrepo.branches.local:
remote_branch_name=f'{remote_name}/{branch}'remote_branch=repo.branches[remote_branch_name]
local_branch=repo.branches[branch]
# Reset the local branch to the corresponding remote tracking branchrepo.branches.update(local_branch.name, remote_branch.target)
Description
The tile says it all.
Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: