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).
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.
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:
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.
Comments