Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git diff among two different repositories in two different folder

I would like to know how can I get the git diff from 9.3.1-STABLE and TN-9.3.1-STABLE, with following folder/git structure

root@build3:/tank/home/stable-builds/FN # git branch
  9.3-STABLE
* 9.3.1-STABLE

root@build3:/tank/home/stable-builds/TN # git branch
TN-9.3-STABLE
* TN-9.3.1-STABLE
master

Any answer will be much appreciated.

like image 679
vector8188 Avatar asked Dec 25 '22 14:12

vector8188


1 Answers

First we make the two git repos know each other

Go to one repository

cd /tank/home/stable-builds/FN

Add the other repo as "remote"

git remote add TN /tank/home/stable-builds/TN

Fetch the other repo

git fetch TN

Now, we ask for a diff

git diff 9.3.1-STABLE remotes/TN/TN-9.3.1-STABLE
like image 99
BartBog Avatar answered May 17 '23 07:05

BartBog