diff
Javascript utility for calculating deep difference, capturing changes, and applying changes across objects; for nodejs and the browser.
I have a script that works fine in one branch and is broken in another. I want to look at the two versions side-by-side and see what's different. Are there any ways to do this?
To be clear I'm not looking for a compare tool (I use Beyond Compare). I'm looking for a git diff command that will allow me to compare the master version to my current branch version to see what has changed. I'm not in the middle of a merge or anything. I just want to say something like
git diff mybranch/myfile.cs master/myfile.cs
Source: (StackOverflow)
When I do git diff COMMIT
I see the changes between that commit and HEAD (afaik) but I would like to see the changes that were made by that single commit.
I haven't found any obvious options on diff/log that will give me that output.
Source: (StackOverflow)
I really like Araxis Merge for a graphical DIFF program for the PC. I have no idea
what's available for linux, though. We're running SUSE linix on our z800 mainframe.
I'd be most grateful if I could get a few pointers to what programs everyone else likes.
Source: (StackOverflow)
I know that there is a post similar to this : here.
I tried using the comp
command like it mentioned, but if I have two files, one with data like "abcd" and the other with data "abcde", it just says the files are of different sizes. I wanted to know where exactly they differ. In Unix, the simple diff tells me which row and column, the comp command in windows works if I have something like "abd" and "abc". Not otherwise. Any ideas what I can use for this?
Source: (StackOverflow)
The man page for git-diff
is rather long, and explains many cases which don't seem to be necessary for a beginner. For example:
git diff origin/master
Source: (StackOverflow)
I'm running git-diff on a file, but the change is at the end of a long line.
If I use cursor keys to move right it loses colour coding and worse the lines don't line up, making it harder to track the change.
Is there a way to prevent that problem, or to simply make the lines wrap instead?
(running git 1.5.5 via mingw32)
Source: (StackOverflow)
I love to use git diff -w
to ignore whitespace differences. But, I just noticed that it ignores even whitespace differences in the middle of lines. How could I only ignore whitespace differences that come at the start (^) or end ($) of lines?
Source: (StackOverflow)
What is the easiest way to highlight the difference between two strings in PHP?
I'm thinking along the lines of the Stack Overflow edit history page, where new text is in green and removed text is in red. If there are any pre-written functions or classes available, that would be ideal.
Source: (StackOverflow)
Scenario: I have opened Vim and pasted some text. I open a second tab with :tabe
and paste some other text in there.
Goal: I would like a third tab with a output equivalent to writing both texts to files and opening them with vimdiff
.
The closest I can find is "diff the current buffer against a file", but not diff
ing two open but unsaved buffers.
Source: (StackOverflow)
I'm using msysgit 1.7.7.1 on Windows. I get an error when using git diff
. What is causing this? Is there no diff tool included in msysgit? What should I do?
WARNING: terminal is not fully functional
Source: (StackOverflow)
I have deleted a file or some code in a file sometime in the past. Can I grep in the content (not in the commit messages)?
A very poor solution is to grep the log:
git log -p | grep <pattern>
However this doesn't return the commit hash straight away. I played around with git grep
to no avail.
Source: (StackOverflow)
When I type 'git diff', I want to view the output with my visual diff tool of choice (SourceGear diffmerge on Windows). How do I configure git to do this?
Source: (StackOverflow)
I staged a few changes to be committed; how can I see the diff of all files which are staged for the next commit? I'm aware of git status, but I'd like to see the actual diffs - not just the names of files which are staged.
I saw that the git-diff(1) man page says
git diff [--options] [--] […]
This form is to view the changes you made relative to the index (staging area for the next commit). In other words, the differences are what you could tell git to further add to the index but you still haven't. You can stage these changes by using git-add(1).
Unfortunately, I can't quite make sense of this. There must be some handy one-liner which I could create an alias for, right?
Source: (StackOverflow)
How can my client apply patch created by git diff
without git installed?
I have tried to use patch
command but it always asks file name to patch.
Source: (StackOverflow)
I'm using git bash on Windows 7. When I run git diff
, I see this:

However, I'm unable to get back to a regular prompt. Pressing Ctrl+C seems to work, but as soon as I start typing a command, it's covered up with (END)
as in that image.
Source: (StackOverflow)