Tag: diff

is there a simple way to know which files will be updated in the next 'git pull'?

i would like to know which files would be updated (and hopefully the changes that would occur) if i’d do a ‘git pull‘… is git stash git fetch git diff origin/master git stash apply the answer ?

How do I use Notepad++ Compare as the diff tool in git bash/command line?

Is there any way to change the default diff tool in gitbash? This post seems to suggest it is possible but they provided no command line examples. Link: Running NotePad++ from Command line with Compare Plugin showing compare result

Why does cherry-pick tell me that I have all lines changed?

Updated Consider file abc, identical in both commits A and B begin 123 456 789 klm end In A, we refactor first line 123 => AAA and pick B on top of the result. Git tells that all lines in the file have changed. Its diff will operate normally however, if we modify B by […]

Git show whole file changes

Is there a way to get the git show command to show the whole contents of a file when viewing a commit? For example: if it currently show something like foo.cpp +++ int main() { +++ std::cout << “HELLO” << std::endl; +++ } I would want the output to say: foo.cpp #include <stdio> //assuming this […]

How to make git log show file paths relative to current directory?

The current Git-based project that I am working on, I am generally always in a sub-directory. Below is the output when I run the command git log –name-only from a sub-directory of the root of the repository. commit 678bd5ba6fc5474c4c61406768bf6cba5937c5d1 Author: thegreendroid Date: Mon Mar 27 09:36:24 2017 +1300 Commit message child_dir1_from_root/file1 | 184 +– child_dir2_from_root/file2 […]

Import changes into a git repository from universal diff

I’m trying to import changes from one source control system (proprietary and complicated) into a git repository. I’m doing this currently by running a script that simply syncs to each revision in order and commits this to the git repository, but for various reasons this has become unworkable. For each revision, I can get a […]

Interactively merge files tracked with git and untracked local files

I use a couple of software packages (like gitlab) that you install by cloning from their git repo. They typically come with some config.example (under version control), which you copy to your own config file (not under version control or even ignored in .gitignore) and adapt to your needs. When the upstream package is updated […]

Show git diff, ignoring file permission changes?

I have run several chmod in my live server. Right now when I do a git diff there, I see lots of old mode 100644 new mode 100755 I have also changed some files there. But I would just git diff just to show the changes on the files, ignoring the file permissions changes. How […]

Get git diff for any merged branch

For each defect in code I create separate branch. When defect is fixed I merge this branch in master, so I have history like illustrated below (we see two branches with fixes): defect1 fix defect2 fix a—b—c—d e—f / \ / \ —o—1—x—y—z—2—o—3—w—4—o— The question is how to get diff for fix1 (between branch start […]

Git's blob data and diff information

As far as I know, Git’s blob has SHA1 hash as file name, in order not to duplicate the file in the repository. For example, if file A has a content of “abc” and has a SHA1 hash as “12345”, as long as the content doesn’t change, the commits/branches can point to the same SHA1. […]

Git Baby is a git and github fan, let's start git clone.