visual studio – Git Pull is not updating the files -VS2022


It sounds like you’re dealing with a common issue where the Git pull only syncs the commit history without updating your actual code files on the second PC. Since you’re working with two computers using the same account and repo, let’s go through a few steps to troubleshoot and resolve this.

1. Check the Branch

First, make sure both computers are on the same branch. Git won’t update files if you’re pulling on a different branch.

In the terminal on the second PC, run:

git branch

If you’re not on the same branch as your first PC, switch to the correct branch:

git checkout {name} 

2. Pull the Latest Changes

It’s possible the pull command isn’t fetching the latest changes properly. Try these commands to ensure you’re pulling the most recent code:

git fetch origin
git pull origin {name}

3. Check for Uncommitted Changes

Sometimes if there are local changes on the second PC, Git won’t apply the new changes from the repo. Run:

git status

If you see any uncommitted changes, you’ll need to either commit or stash them before pulling.

To temporarily stash your changes:

git stash

Then pull the changes:

git pull

Once the pull is successful, you can reapply your stashed changes:

git stash apply

if something doesn’t work let me know.
also I recommend to use a software different from vscode for git, like gitkraken
have a good day

Leave a Reply

Your email address will not be published. Required fields are marked *