How to take combined Git diff between 2 commit changesets without including the changes made by merge commits.
For ex :
Commit-1a
File - gitdiff.js
Changes
function check(){
var a=10;
console.log(a);
}
Commit-2b (Merge commit)
File - gitdiff.js
Changes
function merge(){
console.log(“inside merge”);
}
function mergechange(){
console.log(“inside mergechange”);
}
Commit-3c
File - gitdiff.js
Changes
function lastfn(){
console.log(“inside lastfn”);
}
File Content after 3 commits
function merge(){
console.log(“inside merge”);
}
function check(){
var a=10;
console.log(a);
}
function mergechange(){
console.log(“inside mergechange”);
}
function lastfn(){
console.log(“inside lastfn”);
}
When I am giving git diff between commit 1a and commit 3c, I want the output diff like the following.
Git diff commit-1a commit-3c
File - gitdiff.js
Changes
function check(){
var a=10;
console.log(a);
}
function lastfn(){
console.log(“inside lastfn”);
}
Is there anyway to get the output like the above without including the merge changes ?