KB0054 - Git Sync: There is no tracking information for the current branch

KB0054 - Git Sync: There is no tracking information for the current branch

Affected Versions

- PowerShell Universal 4.2.0 - 4.2.5

Problem

Attempting to synchronize with a git remote returns an error stating "There is no tracking information for the current branch". 

Root Cause

A defect in PowerShell Universal's git synchronization process is causing the pull command to run with a blank password. Issuing the command in this way causes the git library to remove the remote and report this error. This is caused by clicking the Synchronize Now button on the Git page. Once it has been clicked, the system will be in this state and needs to be reconfigured properly. 

Workaround

The following requires a git command line client to be installed. You will need to reset the git remote in order to force git to sync properly. Within the repository directory, run the following commands. Ensure that you update the branch name with the one you are using.
  1. git fetch
  2. git  branch --set-upstream main origin/main
In versions between 4.2.0 and 4.2.5, clicking the Synchronize Now button will put the repository back in this state and the work around will need to be done again.