Git shows differences even after `push --force`?

Royi Namir

Simplification :

enter image description here

In my master branch I've added some garbage.
Then I pushed it to origin/master

Later I've discovered that it was a mistake to add that garbage. I know I can/should create a revert commit.

But I didn't. I did a git reset --hard

enter image description here

But now I want that the origin/master will look exactly the same as my local.

Obviously I can't push becuase git tells me to pull before push.

So I did push --force:

enter image description here

But even after that , sourcetree shows that they are not the same :

enter image description here

Even though if I check for changes , I see no changes :

enter image description here

Question:

If remote master and local master has no differences , why does sourcetree show me pull ?

enter image description here

Even git status shows I'm ok (without pull) :

enter image description here

unreleased

SourceTree checks the remote status periodically.

Solution 1: Simply reopen the Sourcetree

Solution 2: Tools>Options>General check default remotes for updates every X minutes. Make the X to 1/2 to get to see the status change faster. Like as the image you can see the updated status after 1 minute.

change remote update time

Hope this will help.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Teamcity after git force push

git push showing "Everything up-to-date" but compare shows differences

git repository is not reflecting the changes made even after git push

git ls-files --stage shows files even after committing

How to download a specific git tree or commit after force push

Git push with or without force

Regarding git force push

How to show all changes in visual studio git even after push

git push still asking for credentials even after caching credentials

Git push fails with “No route to host” error even after disabling proxy

Rebase after force push

What are the differences between "git commit" and "git push"?

git push shows wrong username

git pull --rebase lost commits after coworker's git push --force

Git force push with IntelliJ IDE

How to detect a git push --force

git get force push history

Force push to Gerrit even with no new changes

why git status shows "working directory clean" even after I add a new file

Git repository size remains large on remote (Gitlab) after purging of large files with git filter-branch then git push --force

Why is `git push --force-with-lease` failing with "rejected ... stale info" even when my local repo is up to date with remote?

Git push after rebase

git clean filter shows differences in the result of git diff

How to know what differences that "git push" is going to push?

Git - how to force manual merge even if there is no conflict

Shows tons of vlc application even after removing it

Failed push but git status shows nothing to commit

How do I properly force a Git push?

How to use git kraken for a force push