Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I created 2 folders: foo and bar.
- Both has in it a same.txt which is the same and a diff1.txt which differs.
- Both has a buz folder (to test recursivity) and the bars have a same.txt and a diff2.txt.
- -> foo/bar
- -> same.txt
- -> diff1.txt
- -> bar
- -> same.txt
- -> diff2.txt
- I executed `git diff foo bar` and `git diff --no-index foo bar`. 2 questions I look for ansers now:
- - There is zero difference from the outputs. So what's --no-index is?
- - They both found the diff for buz/diff2 so is --recursive the default behavior?
- Next, I executed `git diff help` and I'm immediately thrown a warning in my face: "warning: Not a git repository. Use --no-index to compare two paths outside a working tree". This makes me conclude that whatever I do --no-index will be needed.
- Next I started to investigate your `git diff --recursive --brief from{Build,Google}` suggestion and now I'm realizing it isn't supposed to be "git diff" as neither --recursive nor --brief is a git diff option ("error: unknown option `recursive'")
- In fact google doesn't have results for "diff --recursive --brief" so I'm not quite sure wher you got that from?
- C:\Users\user\Desktop\delme2>git diff foo bar
- diff --git a/foo/buz/diff2.txt b/bar/buz/diff2.txt
- index 534e3eb..74454b9 100644
- --- a/foo/buz/diff2.txt
- +++ b/bar/buz/diff2.txt
- @@ -1 +1 @@
- -xyz1
- \ No newline at end of file
- +xyz2
- \ No newline at end of file
- diff --git a/foo/diff1.txt b/bar/diff1.txt
- index da24a33..796740f 100644
- --- a/foo/diff1.txt
- +++ b/bar/diff1.txt
- @@ -1 +1 @@
- -abc1
- \ No newline at end of file
- +abc2
- \ No newline at end of file
- C:\Users\user\Desktop\delme2>git diff --no-index foo bar
- diff --git a/foo/buz/diff2.txt b/bar/buz/diff2.txt
- index 534e3eb..74454b9 100644
- --- a/foo/buz/diff2.txt
- +++ b/bar/buz/diff2.txt
- @@ -1 +1 @@
- -xyz1
- \ No newline at end of file
- +xyz2
- \ No newline at end of file
- diff --git a/foo/diff1.txt b/bar/diff1.txt
- index da24a33..796740f 100644
- --- a/foo/diff1.txt
- +++ b/bar/diff1.txt
- @@ -1 +1 @@
- -abc1
- \ No newline at end of file
- +abc2
- \ No newline at end of file
Add Comment
Please, Sign In to add comment