1
vote
1answer
15 views

gitpython and git diff

I am looking to get only the diff of a file changed from a git repo. Right now, I am using gitpython to actually get the commit objects and the files of git changes, but I want to do a dependency ...
1
vote
1answer
21 views

git diff :: overriding .gitconfig external tool

I've configured git to use meld as an external diff tool: $ cat ~/.gitconfig | grep -A2 "\[diff\]" [diff] tool = vimdiff external = git-meld ... where git-meld is: $ cat $(which ...
1
vote
2answers
47 views

Git: Find out in which commit was a particular code was added?

I want to find out in which commit did I add the code given below: if (getListView().getChildCount() == 0) getActivity().findViewById(android.R.id.empty).setVisibility(View.VISIBLE); ...
1
vote
2answers
40 views

The colors are jacked up when using Vimdiff from Git in Windows

I have configured Git to use Vimdiff as its diff/merge tool on a Windows machine. It works, but the colors are messed up. First, it won't show any syntax highlighting, no matter how much I tell it to ...
1
vote
2answers
34 views

generating diff between between two branches, after a partial review

Let's say I have this situation in git: B---D---F---H---J---K--->topic / / / A---C---E---G---I--->master After getting as far as commit F, I submit the topic branch for review. ...
-3
votes
1answer
57 views

git diff sees whole file as changed when it's not

The git diff engine is seeing a whole file as changed when it has not. For example, take this commit: https://github.com/etiago/phpvirtualbox/commit/626e09958384f479f94011ac3b8301bd497aec51 Here we ...
2
votes
1answer
35 views

Git diff different directories across branches

I'd like to compare two branches that have diverged significantly. I would also like to limit my comparison to a particular subdirectory where the files where moved in only one of the branches. ...
0
votes
3answers
23 views

GIT - How to list only newly added files between two branches

how can I list newly created(added) files between two branches? I can list all files that have been changed with: git diff --color --name-only branch1..branch2 But that also contains files, that ...
1
vote
3answers
57 views

File not shown in git diff after a git add. How do I know it will be committed?

I had an untracked file which was not appearing in a git diff and when I added it to the 'changes to be committed' area, it still doesn't show up in the git diff. I shows up with a 'git status -v' ...
1
vote
1answer
58 views

git diff not working on unstaged changes in tracked files

I have two machines, one with git 1.7.0.4, and the other with 1.7.12.4 (Apple Git-37). I've modified a file in the tree on each machine (the same change, the same file, but located on two different ...
1
vote
0answers
63 views

is it possible to add a comment to a diff file (unified)?

I wonder if it's possible to add a certain amount of unparsed content to a diff file (unified) that is ignored as a comment. One good use of this would be having git diffs augmented with important ...
1
vote
4answers
42 views

Exclude a single commit from a “git diff”

Morning all, Let's say I have a series of commits as follows: abc000 def111 abc222 def333 abc444 def555 I know I can use $ git diff -c --binary abc000..def555 > /tmp/abc000_def555.patch to ...
0
votes
2answers
36 views

How to view the changes of a Git branch

I have feature/bug-fix branch (say topic) with a bunch of commits and want to present them to my colleagues before merging them into master. I can manually find the common ancestor of my branch and ...
1
vote
0answers
148 views

git Bad file number

I've been trying to git archive a new version of the system I'm currently working on, but, suddenly, the git archive command, which I used to use, stopped working. I use the git archive followed by ...
0
votes
0answers
42 views

Git diff from remote location

Not sure if this is possible, I have a repo with beanstalk, I have it setup on a production server, just for pulls. I have another on my development server, where I do all the changes and push to ...
1
vote
1answer
31 views

automatic Suggestions for Checking out/seeing diffs for files modified

I have a big project, in which while working on any feature, I could be making edits to 6-8 files, each in turn nested some 6-10 levels. (Currently I copy paste the whole filepath using ctrl+shift+c, ...
0
votes
1answer
37 views

List out all the files that I have pushed to the remote Git repo

How do I list out all the files that I have pushed in my last push to a remote Git repository? I have a project and have modified only few files and add, commit and push it to the remote. Now how do ...
0
votes
2answers
133 views

Git diff-how to get different files(only name) between two tags by git diff and order by the file commit time

Through the command: $git diff --name-status tag1 tag2 -- target-src output like: M src/config.h M src/createTable.sql A src/gameserver/BattleGround_10v10.h M ...
1
vote
0answers
72 views

Find out the changed file names and (added) line numbers

I need to get the changed files names for every added line, its line number E.g. given this commit, I want to get compat/unsetenv.c and 5,6,7. I was trying to use git show <commit-id> ...
1
vote
2answers
120 views

SourceTree: how to do a git diff in the opposite direction?

How can I do a git diff in the opposite direction in Atlassian SourceTree? In other words, how do I get SourceTree to do git diff b a instead of git diff a b? e.g., if my commits are in this order ...
2
votes
1answer
891 views

How to Diff between local uncommitted changes and origin

Lets say I cloned a repository and started modifying files. I know that if I have local uncommitted changes, I can do a diff as follows git diff test.txt and it will show me the difference between the ...
0
votes
1answer
35 views

Git - How to save diff to file when diff.external tool is configured?

I've configured my git to use Meld as the diff tool: git config --global diff.external /home/myname/diff.py When I'm trying to save a diff to a file by: git diff > file.diff Meld is opened and ...
1
vote
1answer
164 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
74 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', ...
0
votes
1answer
19 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
138 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
1answer
47 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
63 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
216 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
36 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
55 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
144 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 ...
4
votes
1answer
157 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
1answer
50 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
38 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
51 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
210 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
138 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
54 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 ...
4
votes
2answers
257 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 ...
1
vote
1answer
118 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 ...
7
votes
2answers
1k 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
143 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
75 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
65 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
19 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
114 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: ...
1
vote
2answers
156 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
47 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
134 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. ...

15 30 50 per page