Shows changes between the working tree and the committed contents of a git repository, or between two commits or branches of the repository.

learn more… | top users | synonyms

1
vote
1answer
8 views

araxis merge for mac and git diff

I'm trying to use command line git on os x in conjunction with araxis merge. I'd like git diff foo to open it araxis I've copied the utilties in the installer to /usr/bin $ cd /usr/bin/ $ ls | ...
0
votes
1answer
24 views

python program works fine from command line and as git difftool, but dies as external-diff

Here is the program running normally, it is dying but for a good reason (because files a and b do not exist). % dmp_diff a b {'LESS': '-R', 'LC_CTYPE': 'en_US.UTF-8', 'SHELL': '/usr/local/bin/zsh', ...
1
vote
1answer
25 views

github, SHA-1 hash and git duplicates

I have a github repo which seems to have duplicate commits. Each commit has the same message string and the same date/author, but different SHA-1 hash sums. For example, in my log I found the ...
0
votes
1answer
15 views

Showing which files that match a specific pattern have changed between git branches

I want to merge two branches but before, I'd like to review the changes between the two branches on all files whose filename ends with .twig. Is it possible, or should I use some bash-magic like git ...
0
votes
0answers
15 views

Git diff seems to ignore the diff.external variable

I have been using visual diff tool (opendiff) with a wrapper script and set the diff.external variable to point to it for some time now. Recently I decided to try delta walker because opendiff just ...
0
votes
0answers
24 views

How can I change what PyCharm compares in the background?

PyCharm does comparison on the fly (git in my case), showing the insertion and deletion by the scroll bar along with the warning and error hints. I am a bit puzzled by the revision it compares, ...
0
votes
1answer
21 views

git command to compare current working directory and another commit

I have a modified file on my current working directory called file.txt. I want to compare it with a version of it on debug branch. The following command does not work: git diff file.txt ...
0
votes
1answer
30 views

Git: Diff a list of files

Is it possible to add a list of files somewhere to a changelist or file or something, and to run git diff commit1 commit2 myListOfFiles and to get the diff of just that list of files? Or is it ...
0
votes
1answer
40 views

Git diff is complaining, “external diff died, stopping at … ” with my python diff program

Here's the beginning part of my diff. #!/usr/bin/env python import fileinput import difflib import subprocess import sys # for debugging def info(type, value, info): import traceback ...
0
votes
1answer
24 views

Git diff without the pluses and minuses

Is there a git way of outputting a diff without the pluses and minuses on the beginning of each line? (of course relying only on the color to indicate the operation) I tried using sed to remove them ...
1
vote
1answer
35 views

Git: Create a patch from a list of certain files [duplicate]

I want to create a patch from a list of files. For example I have 10 commits which modify 4 files. I want to create a patch that includes changes of 3 of those 4 files during those 10 commits. How can ...
3
votes
1answer
33 views

How to enable wildcard file paths for git diff?

I would expect git diff to work like git add and others, in being able to do something like git diff **/models.py rather than having to do git diff /full/path/to/my/python/file/called/models.py ...
1
vote
0answers
22 views

3-way diff: How to read

Preface: This question is about understanding the basic unified diff output format. Three way diffing and merging is probably something best done from the comfort of a proper GUI merge tool, or at ...
0
votes
2answers
27 views

Comparing a commit to its parent to see changes to a file

When you run git diff (specific commit)^..(specific commit), or in other words when you compare a commit to its parent, how do you know what was changed on the file. What does the change for that ...
0
votes
1answer
20 views

Git diff without clone

We recently migrated from SVN to Git, and I'm trying to convert our deployment scripts to pull from the new repo. One script creates a "hotfix", which just includes files that have changed between ...
0
votes
3answers
29 views

What is Git actually doing when I run git diff

As a newcomer to Git, can somebody please explain in relatively simple terms what git diff actually does, without going into branching/merging etc? From my experience I know the outcome of running ...
0
votes
1answer
41 views

What goes into determining git diff status codes?

I have two separate clones of the same remote git repository. In one of them, I created a file testme that contains a single line of text "test1". I added, committed, and pushed the file to origin. ...
0
votes
1answer
60 views

git diff tmp file invalid on windows when using external program on Windows 7

I'm following the docs from the Git configuration page and trying to apply this to my Windows 7 environment. When I run say, "git diff file0" I get an error in P4Merge: Errors: '/tmp/cH9ccM_file0' is ...
5
votes
1answer
121 views

Strange conflict on git

I read an article about three-way merges (diff3). It gives an example about how is detects a conflict. The example is : A=[1,4,5,2,3,6] O=[1,2,3,4,5,6] <<< Origin B=[1,2,4,5,3,6] In the ...
1
vote
1answer
38 views

Getting the total diff made by all commits matching a string

When our development team use Git we always include the case number we are working with in the commit message. When we code review a particular case, we would like to a way to show all the changes ...
1
vote
1answer
61 views

How to make git diff ignore comments

I am trying to produce a list of the files that were changed in a specific commit. The problem is, that every file has the version number in a comment at the top of the file - and since this commit ...
0
votes
1answer
23 views

Is there something similar to diff --show-c-function in git-diff?

I've been working on a file in my git repository. If I have a copy of the original git version of the file, I can run diff --show-c-function to get a comparison of the 2, files, where (in theory) it ...
1
vote
1answer
58 views

How can I get git to use graphical diff locally and textual diff over ssh?

I've configured git to use meld as the difftool, but I sometimes need to see textual diffs when working over SSH. Is there any way to configure git so that it uses the proper diff tool for the ...
3
votes
1answer
192 views

Can TortoiseMerge be used as a difftool with Windows Git Bash?

I'm just starting to work with Git. I would like to use TortoiseMerge as the difftool and mergetool. In my .gtconfig in my personal user directory I have the following sections. I've removed the ...
0
votes
1answer
51 views

What is the right way to merge branches when `git diff` shows changes but `git merge` does nothing

I get stumped when git diff other_branch shows differences and git merge other_branch does nothing. What's the right way to incorporate that "missing" code into my_branch? This SO answer diagramed a ...
1
vote
2answers
53 views

Git Revision Diff

I was primarily on svn and now a git newbie. I use "git svn" on a macbook to work with my svn repository, but occasionally I have to work remotely when the only access I have to the office network is ...
0
votes
1answer
24 views

How to configure unified diff context via git-config?

How can I configure via git-config the unified context so that I don't have to always provide the -U or --unified option with a value?
1
vote
2answers
17 views

Taking the changes of a specific file from a past commit and putting it in a new branch

a while back I changed a file. today I want to add these changes to a few branches. The thing is that the commit of which that file was changed also include other files, which I don't want to be ...
1
vote
1answer
51 views

What are the arguments that git diff uses for diff command?

When you invoke git diff, it's using the diff utility to compare files, however, not in the default way. It's using a number of extra options, some I can name are: Different markers before lines: ...
2
votes
0answers
74 views

Git sublime package does not work

Git diff in my sublime text throws following error error: Malformed value for push.default: simple error: Must be one of nothing, matching, tracking or current. fatal: bad config file line 7 in ...
0
votes
2answers
61 views

How can I generate/apply git patches only for commits that alter specific files

I have two git repos that are forks of each other and I need to occasionally import commits from one to the other. For example: git-repo1 has this directory structure: repo1/project1/src ...
1
vote
0answers
32 views

Get changed line numbers on GitHub commits

When you go to a repo on GitHub and click on one of the commits, apart from the commit message, the website also shows you the changed source files with blue areas (+) for additions an red (-) for ...
0
votes
1answer
69 views

Why does git pull cause local changes I did not make

I am working with two collaborators in a git repository. I recently committed some changes locally, then pulled from our github repo of the work. This caused a couple of conflicts which I resolved. ...
0
votes
2answers
42 views

error in git log

So I have been coming into this git log error several times now. I wrote this simple java code to illustrate it. I commit my progress (writing it gradually) and then run git log -p --decorate class ...
0
votes
1answer
57 views

Git diff filenames breaking consistency

This line was taken from a raw diff consisting of 2852 file changes (switched multiple libraries). diff --git "a/system/cms/config/database.php\n" "b/system/cms/config/database.php\n" Out of all ...
2
votes
2answers
114 views

git diff filtered by file name

I would like the results of git diff to be filtered by the file name. In particular, I want a diff for all of the files named "AssemblyInfo.cs", but located anywhere within the git repository. I am ...
-4
votes
1answer
266 views

How can i view git diff for any commit using vim-fugitive?

vim-fugitive side-by-side git diff is great for viewing diff of unstaged files. How can i use vim-fugitive to git diff staged files? any git revision?
0
votes
2answers
87 views

PHP library to generate code diff (github style)?

I'm looking for an free php library that can generate code diff HTML. Basically just like GitHub's code diffs pages. I've been searching all around and can't find anything. Does anyone know of ...
2
votes
1answer
113 views

Why does “git log --name-only” show one file change, but “git diff” shows more?

When I run git log --name-only it shows sha1 and sha2 as consecutive commits and only one file was changes in sha2. However, when I run git diff sha1 sha2 it shows differences in a lot of ...
0
votes
2answers
53 views

git diff between 2 revisions included

I'm doing a : git diff --diff-filter=AM --name-only 59ade6e..c1fc4d8 The 59ade6e hash is a commit where I added all my files (my first commit). But when I execute my command it seems that it ...
0
votes
2answers
85 views

Git - How can I reliably query if any files in master have been updated, via a merge or commit, since a period of time?

There are number of questions which try to map the CVS ability of cvs diff -D "1 days ago" to git: Git - How can I list all files changed on the master branch between two times? In git, how can I ...
0
votes
1answer
113 views

Understanding git diff on files [duplicate]

What does the folowing output of git diff mean? diff --git a/README.md b/README.md index 24aa464..49c20f4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,2 @@ LINE1 -LINE2 LINE3 I think I ...
0
votes
1answer
367 views

Customize shortcuts for Git plug-in on Sublime Text 2 [closed]

I would like to have a shortcut to: Tools -> Git -> This file -> DiffTool I have it installed on a machine with Ubuntu 12.04, if it makes any difference. Thanks!
0
votes
0answers
9 views

Can on get git output that does not contain certain strings? Like a -S<string> NOT?

I am seeing the -S and -g options to git diff. They would let me see differences that involve specified strings. But I have something I want to check which is the opposite. I have do a bunch of ...
3
votes
1answer
111 views

git diff - show only what's new on the remote

I have a local repo and a remote repo on github. For business reasons, they aren't in sync. I've done a lot of work on the local that I'm keeping, and now I'm manually adding whatever's new to the ...
0
votes
2answers
68 views

Git: Skip over a commit

Given a scenario where commit 1 installs a whole new functionality therefore it adds, deletes and changes a few functions. Afterwards a few commits are performed that only fix minor problems found in ...
0
votes
1answer
94 views

Must I exit my Git diff tool after each file in a merge?

I'm using a GUI difftool (p4merge, kdiff3, araxis, etc.) to view do my Git merges. This works great, but it seems that I need to quit the tool after editing each file in the merge in order for Git to ...
1
vote
3answers
68 views

How to find a specific change in a specific file in Git

I have a file in a Git project that had a specific value changed at some point by someone; I don't know who or when. I want to find when the change was made, but I'm not sure how I can track that in ...
1
vote
2answers
23 views

Can you stage a file (or at least, a section of a file) DURING a git diff?

Before I stage files, I like to perform a git diff to check that everything is okay. While I'm vertically traversing down a diff, I make a mental note of each file that is "OK" for staging. If it's a ...
0
votes
1answer
61 views

Github is not showing the differences of my commits correctly

I submitted a commit with some fixes here and there, but github is not correctly showing the differences (e.g this line removed, this one added, etc). It just shows two big walls of code, one red ...

1 2 3 4