How to compare local with remote git repo in PhpStorm?

Jordan

I am stuck on how to compare local files to files in remote repo.

See screenshot as an example.

I right-click on app.js Git > Compare with Branch

I selected origin/master (the remote repo to compare with). Phpstorm is reporting that there are no differences in the files. However, I know this is not the case.

In the screenshot, Item #1 (see arrow) is the remote file on bitbucket. Item #3 is the local file. Phpstorm is reporting no difference (Item #2).

enter image description here

UPDATE

I've learned the git command line commands for what I want to do. Thanks to @Shahbaz

Suppose I have local master and the remote origin/master

So, to see the difference between a local file index.js and the remote index.js, I'd do the following

$> git fetch origin
$> git diff master origin/master -- index.js

Maybe by providing the command line commands, someone can tell me the PhpStorm equivalent to get a graphical diff.

Nate

In order to see a graphical diff between your local version of the file, and the latest remote version of the file, run the following two commands in sequence:

  1. VCS Menu > Git > Fetch
  2. VCS Menu > Git > Compare with Latest Repository Version

The important step here is actively fetching (rather than pulling) the most recent data from the remote repository. If you're interested, this will help explain in more detail: What is the difference between 'git pull' and 'git fetch'?

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to compare GIT Remote Repo and local in Netbeans

From Dev

Git / GitHub: How to get new local repo into empty remote repo

From Dev

How to remove a file from git repo on local and remote

From Dev

How to disconnect local git repo from remote master

From Java

How to compare a local git branch with its remote branch?

From Dev

Check if local git repo is ahead/behind remote

From Dev

Merge local git repo with remote one

From Dev

Bring a local folder to remote git repo

From Dev

git not overwriting remote repo with local files?

From Dev

How can I convert all the remote branches in a local git repo into local tracking branches

From Dev

Push local new Git repo to existing remote repo as branch?

From Dev

unable to push my local git repo to the remote repo

From Dev

Remote Repo name changed in Github, but not reflecting in Local Repo with Git fetch

From Dev

Drop remote branch and reset local repo to match remote using GIT

From Dev

Git: compare local branch to remote staging and production

From Dev

How do I tell git to ignore my local changes, but leave the file in my remote repo?

From Dev

How do I compare a local git branch with a remote git branch with this setup?

From Dev

How to know local repo is different from remote repo, without fetch?

From Dev

How to know local repo is different from remote repo, without fetch?

From Dev

How do determine the URL of a remote git repo?

From Dev

How to cleanup garbage in remote git repo

From Dev

Git: How to remove secondary remote repo

From Dev

How to switch to a new remote repo in git?

From Dev

How do determine the URL of a remote git repo?

From Java

Push local Git repo to new remote including all branches and tags

From Java

Delete local Git branches after deleting them on the remote repo

From Dev

Creating a git repo on a remote server from a local machine

From Dev

Going remote from local repo: Git and forgetting large files

From Dev

Can I add a file to my local Git repo but not push it to remote

Related Related

  1. 1

    How to compare GIT Remote Repo and local in Netbeans

  2. 2

    Git / GitHub: How to get new local repo into empty remote repo

  3. 3

    How to remove a file from git repo on local and remote

  4. 4

    How to disconnect local git repo from remote master

  5. 5

    How to compare a local git branch with its remote branch?

  6. 6

    Check if local git repo is ahead/behind remote

  7. 7

    Merge local git repo with remote one

  8. 8

    Bring a local folder to remote git repo

  9. 9

    git not overwriting remote repo with local files?

  10. 10

    How can I convert all the remote branches in a local git repo into local tracking branches

  11. 11

    Push local new Git repo to existing remote repo as branch?

  12. 12

    unable to push my local git repo to the remote repo

  13. 13

    Remote Repo name changed in Github, but not reflecting in Local Repo with Git fetch

  14. 14

    Drop remote branch and reset local repo to match remote using GIT

  15. 15

    Git: compare local branch to remote staging and production

  16. 16

    How do I tell git to ignore my local changes, but leave the file in my remote repo?

  17. 17

    How do I compare a local git branch with a remote git branch with this setup?

  18. 18

    How to know local repo is different from remote repo, without fetch?

  19. 19

    How to know local repo is different from remote repo, without fetch?

  20. 20

    How do determine the URL of a remote git repo?

  21. 21

    How to cleanup garbage in remote git repo

  22. 22

    Git: How to remove secondary remote repo

  23. 23

    How to switch to a new remote repo in git?

  24. 24

    How do determine the URL of a remote git repo?

  25. 25

    Push local Git repo to new remote including all branches and tags

  26. 26

    Delete local Git branches after deleting them on the remote repo

  27. 27

    Creating a git repo on a remote server from a local machine

  28. 28

    Going remote from local repo: Git and forgetting large files

  29. 29

    Can I add a file to my local Git repo but not push it to remote

HotTag

Archive