- 
                Notifications
    You must be signed in to change notification settings 
- Fork 11
Open
Labels
Description
if you are comparing say main to v1.x and you then switch to v1.x and make a change then commit it, then switch back to main, your diff will still be compared to the old ref on v1.x.
Attempting to refresh with cause an error saying no such file or directory .git/packed-refs.
After running git pack-refs you will get the following error and will not be able to refresh or change base.
Updating the git tree failed: Could not determine commit for "heads/v1.x"
Steps:
echo "# first entry" > README.md  
git init
git add README.md
git branch -m main
git commit -m "first commit"git tag v1.x git branch v1.x v1.xecho "# second entry" >> README.md
git add README.md
git commit -m "second commit"Open Git tree Compare select v1.x as base. See diff showing second commit.
Back in terminal, run
git switch v1.xecho "# v1 patch" >> README.md  
git add README.md            
git commit -m "first patch"switch back to main
git switch mainYour diff will not show the "v1 patch"
Attempt to refresh and see error.