git-apply Questions

1

According to the official git docs: git apply --ignore-space-change, --ignore-whitespace When applying a patch, ignore changes in whitespace in context lines if necessary. Context lines will pre...
Doubleripper asked 16/2, 2021 at 9:42

3

I have two sepearate git repos: A and B. Some repository B files are already present in a subfolder of project A. My goal is to create patches for repo B and then applying them to the subfolder wit...
Octavia asked 7/6, 2019 at 21:2

6

I created a diff file by a command: git --no-pager diff --no-index --stat pathA pathB >\diff.log Nextly, I executed a command: git apply --index --ignore-space-change --ignore-whitespace \dif...
Pluck asked 2/1, 2019 at 18:49

2

Solved

I'm trying to apply a .patch file to my source, but it fails because my file index (10655) is older than the patch index (10755). Now I know that I can just modify the patch's file index but I wo...
Vickey asked 17/11, 2011 at 17:3

2

Solved

I have a reason¹ to create my git commits as patch files using git-format-patch with the --no-prefix option. This option changes the patch output to not add the git-diff-specific prefixes a/ / b/ ...
Variole asked 3/1, 2019 at 13:3

6

I work on WordPress based project and I want to patch my project at each new release version of WP. For this, I want generate a patch between two commits or tags. For example, in my repo /www/WP I ...
Alexandretta asked 28/1, 2015 at 12:45

5

Solved

I am on windows. For various reasons we have multiple git instances of different svn branches. Many times I want to fix an issue in repository A, generate a patch, and apply it to repository B....
Birefringence asked 24/4, 2013 at 11:7

2

Solved

I have modified a file (or some files) in my directory, and I've used git add to stage some of the changes lines from the file, but not all the changed line. I can use git diff --staged my-file to ...
Deedradeeds asked 2/7, 2021 at 7:23

2

Solved

This question is about git apply Is there a way to distinguish between: it failed because... ... the patch is already applied ... the source code is really different The directory i work in is...
Nadabas asked 9/1, 2018 at 12:5

1

Solved

I would like to know, which files would be written when applying a .patch file with git apply. Is there a way to apply a .patch file in git with a dry run?
Breadfruit asked 13/2, 2020 at 16:56

1

I needed to edit a messy commit commit that only changed a word in a few subsequent rows, keeping some of those changes and removing others. The changes were easy to see in git diff --word-diff, an...
Federalize asked 15/2, 2019 at 11:19

1

git mergetool is wonderful (in my case, I use kdiff3). However, it is not possible to use it to resolve conflicts from git am or git apply (or even with patch command). Indeed, mergetool need 3 fil...
Susurrous asked 28/9, 2018 at 13:3

2

Assuming a patch was created from a specific commit in the past, and no longer applies to HEAD. How can I find either the first or better the last commit in the history of HEAD, where this patch a...
Era asked 28/5, 2014 at 5:19

2

Solved

Mainly, this question is specific to git with Magento 2. I have a working Magento 2 project and I have installed an extension using github repo - https://github.com/Adyen/adyen-magento2. In my cu...
Rigveda asked 2/9, 2016 at 15:55

3

Solved

I have this patch file, it contains a bunch of modifications that I'd like to apply to a git branch. But I don't want to make one unique commit with all those modifications, instead I'd like to spl...
Liven asked 21/1, 2016 at 19:20

3

Solved

I'm trying to apply a patch to a file using git apply. The overall patch failed, so I used git apply --reject. Inspecting the generated .rej file showed me what's wrong, now I fixed the problem i...
Expediential asked 26/7, 2013 at 11:5

1

Solved

I have always used diff -b to make patches even when working on a git repo. What is the difference between the two, does git diff / git format-patch also internally makes use of the linux/unix di...
Televise asked 13/3, 2014 at 19:5
1

© 2022 - 2025 — McMap. All rights reserved.