FUN WITH LINUX

Git: Comparing a local branch with a remote branch

4 May 2016

Sometimes we want to review the differences between the remote repository and the local one.

Fetch

First we have to fetch the code:

git fetch

Show diff

Using diff it is possible to compare the local master with the remote master(origin):

git diff

Merge

Finally we can merge the changes

git merge
[ git  ]
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 Unported License.

Copyright 2015-present Hoti