I am aware than many questions similar to this one exist. But I have now read as many of them as I could find and tried the fixes with no success.
So, I have a project where I recently had a merge conflict while trying to push. I ended up resolving the conflict via visual studio tool for it, and pushed it.
And this gets me to the point I am currently at. My local version of the project has very different code than the stuff on origin/main
If I try to pull, check status or anything of the like, I get these outputs
PS C:\app> git pull
Already up to date.
PS C:\app> git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
PS C:\app> git add .
PS C:\app> git commit -m "am I commting anythin?"
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
I then take a look at which commit I am currently at, to see if it matches the hash in the remote repo
PS C:\app> git rev-parse HEAD
0a9a00176fc39a7417e44051d4df74785e4dae7d
Which is the same hash as the one that is the current commit on the remote.
I then find this question, and figure that I might be ahead of my remote branch in some way:
PS C:\app> git branch -vv
* main 0a9a001 [origin/main] adding simple one id get
which is exactly the same commit as the newest one on the remote.
Then in a question like this one there is someone having a local ref to origin/main
which is behind. But this does not seem to be the case, since pulling has no effect.
Another possible cause could be that my local origin/main
is'nt tracking it's remote counterpart properly. So I tried running:
PS C:\app> git branch --set-upstream-to origin/main
branch 'main' set up to track 'origin/main'.
This also has no effect.
I've tried a few other things, which have'nt had any effect either. So I'm really hoping someone can help me out
EDIT
I also tried running:_
PS C:\app> git remote show origin
* remote origin
Fetch URL: https://site/_git/minetilbud-ntplus-customer-migration
Push URL: https://site/_git/minetilbud-ntplus-customer-migration
HEAD branch: main
Remote branch:
main tracked
Local branch configured for 'git pull':
main merges with remote main
Local ref configured for 'git push':
main pushes to main (up to date)
And nothing seems out of the ordinary here either