I'm trying to fetch the latest changes from origin/main
to local main
. The output window shows:
Fetching from MyRepo
git: 'credential-manager-core' is not a git command. See 'git --help'.
I then changed 'credential-manager-core' to 'credential-manager' in the gitconfig
file and tried again. Then I get:
Fetching from MyRepo
And the latest updates don't get fetched and my local main
stays the same.
What is wrong?
According to your description, assuming you are using the Fetch Option in the Git Menu of Visual Studio 2022.
In my test, if there are some updates on the origin/main
, it will show this in the output window when using the fetch option.
Fetching from MyRepo
Remote: Azure Repos
Remote:
Remote: Found 3 objects to send. (0 ms)
From https://dev.azure.com/organization/project/_git/MyRepo
f3f4e7f..835f0a0 main -> origin/main
After the above action, if I click the fetch option again, it only shows
Fetching from MyRepo
We can open the Branches page by clicking the Git ->Manage Branches.
Then select the main branch and check the commits which is fetched from the origin/main
in the incoming session.
After confirming the code is correct, use the Pull option to update the local branch with the commits which is fetched from the origin/main
.
The output window:
Updating f3f4e7f..835f0a0
Now, the local main
branch is up to date.
If in the Branches page, you still cannot see any update in the incoming session and cannot do a git pull action, please try the following steps: