There is no tracking information for the current branch

Hi,

I recently installed Powershell Universal and I’m trying to sync out local GitLab. Just created a new project and it is empty. When I try to sync I get an error below.

“Git synchronization failed. There is no tracking information for the current branch.”

What am I missing here?

Thanks,
Halukk

Product: PowerShell Universal
Version: 4.1.8

Is the remote empty or is it bare? As for the local PSU instance, have you made changes locally before trying to sync?

Yes the new project is empty. On Local PSU I had a folder and a test script but remove them and tried as well.

Hey Adam,

I was able to get the Github working but doesn’t seem like pull is working. I can create or delete a file in PSU and I can see changes in Github but when I create a file in git, I cannot see that file in PSU> Scripts. When I check the Settings>Git, I can see the file creation in history.

I’m also experiencing this on 3.10.2. I noticed git stopped syncing, realized my PAT expired, created a new one but when I entered in the new password the error changed to “Git synchronization failed. There is no tracking information for the current branch.” No changes to remote repository since the last successful sync, a few changes have been made and committed to the local PSU instance.

I seem to have a similar issue while setting up a new instance of PSU 4.2.7. I made sure to start with a completely empty local repo and a bare remote repo.

After configuring Git Settings through the GUI, I got a successful sync, and I can see the initial commit in the remote repo.
image

However, all sync attempts after that initial success have failed with the message “Git synchronization failed. There is no tracking information for the current branch.”

Error in the log is:
2023-12-19 14:27:08.408 -05:00 [ERR] Failed to sync: There is no tracking information for the current branch. at LibGit2Sharp.Commands.Pull(Repository repository, Signature merger, PullOptions options) in C:\actions-runner_work\universal\universal\src\libgit2sharp\LibGit2Sharp\Commands\Pull.cs:line 29
at UniversalAutomation.Git.GitService.Pull() in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\GitService.cs:line 667
at UniversalAutomation.GitSyncService.TrySync(GitStatus status, Boolean force, GitSettings settings) in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 194
at UniversalAutomation.GitSyncService.Sync(Boolean force) in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 145

Seems like maybe the issue is just with pulling. I tried changing Git Settings to Push Only and now all is well.

I just setup a new instance, installed as a service on a windows vm and I’m getting this also. Not sure why, it completed the intiial sync successfully and my newly created repo now has the synced files in it, but every minute when it tries to sync I just get ‘Git Synchronization Failed’ (including when i try manually sync). There is no tracking information for the current branch. For info I’m using Azure dev ops + PAT token with full access given while testing.
I’ve changed to push only for now but it would be good to get two-way working.

I got 2 way syncing working by following this:

I am using an external git client as well, instead of the built in one.

@adam Any input on this? Seems that “push-only” is the only one of these options that works, I just upgraded my dev instance to 4.2.13 and this issue still exists.

What does your config file look like in your .git folder? I’m assuming it’s missing the tracking information.

Here’s an example of my test repo.

[core]
	bare = false
	repositoryformatversion = 0
	filemode = false
	symlinks = false
	ignorecase = true
	logallrefupdates = true
[remote "origin"]
	url = https://github.com/ironmansoftware/shiny-octo-waffle.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
	remote = origin
	merge = refs/heads/main

I tried this on my latest, configured through the GUI, in 2 way sync and can edit and make changes as well as pull changes I make on GitHub. This was a clean configuration with an existing repo that I configured.

If the tracking information is missing, the config file likely won’t have the remote section or the remote branch and the command in the above article should resolve it.

When PSU pulls from git, it sets the tracking information based on what is in the database git configuration but it will not reset it once it’s in an invalid state like this.

1 Like