See changes between remote and local repository in Git

in many cases you are not sure whether the files you have on your local machine are newer or older than the ones in the remote repository. Specially when you are working with different people or you have different development environments.

git difference between remote and local repository

the easy solution for this is to use git fetch command to check what are the differences between your local and remote repository. to use git fetch simply append your remote repository name to it and execute it in your repository folder. (like below:)

assuming my remote repository name is origin I used “git fetch origin” on my console.

after fetching the remote details you can see the differences between two repo by using git diff command. here to check my master repository against origin I used git diff origin master. (as below:)

thats it, like this you can see the differences between your repo and find out what are the changes.

have a safe pull 😉

Incoming search terms:

  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1826 G7Rlqg2ehVi_CsBj9PTgdcf6wJc62hp9yHB2EWixQtizpLj0eW0bIj8faeLj8fCS 18e3cbdb09001848d7a07504d8c90671c710e351&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme

Leave a Reply