Lines Matching full:git

30 Sometimes the patch you are backporting already exists as a git commit,
32 ``git cherry-pick``. However, if the patch comes from an email, as it
34 using ``git am``.
36 If you've ever used ``git am``, you probably already know that it is
43 destination tree, as this will make git output conflict markers and let
44 you resolve conflicts with the help of git and any other conflict
57 A good reason to prefer ``git cherry-pick`` over ``git am`` is that git
67 article will assume that you are doing a plain ``git cherry-pick``.
72 Once you have the patch in git, you can go ahead and cherry-pick it into
104 If your attempted cherry-pick fails with a conflict, git automatically
131 To configure git to work with these, see ``git mergetool --help`` or
132 the official `git-mergetool documentation`_.
134 .. _git-mergetool documentation: https://git-scm.com/docs/git-mergetool
154 git log
157 A good first step is to look at ``git log`` for the file that has the
160 frequently patched. You should run ``git log`` on the range of commits
164 git log HEAD..<commit>^ -- <path>
170 git log -L:'\<function\>':<path> HEAD..<commit>^
175 part is actually a regex and git only follows the first match, so
181 Another useful option for ``git log`` is ``-G``, which allows you to
185 git log -G'regex' HEAD..<commit>^ -- <path>
192 git log -G'\->index\>.*='
194 git blame
198 one for a given conflict) is to run ``git blame``. In this case, you
202 git blame <commit>^ -- <path>
208 git blame -L:'\<function\>' <commit>^ -- <path>
214 It might be a good idea to ``git show`` these commits and see if they
219 the latter case, you may have to run ``git blame`` again and specify the
244 ``git cherry-pick --abort``, then restart the cherry-picking process
254 patches and you just want to resolve the conflict. Git will have
265 However, if you were to run ``git diff`` without any arguments, the
268 $ git diff
276 When you are resolving a conflict, the behavior of ``git diff`` differs
286 .. _combined diff: https://git-scm.com/docs/diff-format#_combined_diff_format
295 take into account, this also makes the output of ``git diff`` somewhat
297 ``git diff HEAD`` (or ``git diff --ours``) which shows only the diff
301 $ git diff HEAD
329 As you can see, this has 3 parts instead of 2, and includes what git
338 git config merge.conflictStyle diff3
340 There is a third option, ``zdiff3``, introduced in `Git 2.35`_,
344 .. _Git 2.35: https://github.blog/2022-01-24-highlights-from-git-2-35/
375 ``git add`` or ``git add -i`` to selectively stage your resolutions to
376 get them out of the way; this also lets you use ``git diff HEAD`` to
377 always see what remains to be resolved or ``git diff --cached`` to see
385 renamed, as that typically means git won't even put in conflict markers,
396 rename detection threshold to 30% (by default, git uses 50%, meaning
400 git cherry-pick -strategy=recursive -Xrename-threshold=30
405 backporting to (using ``git mv`` and committing the result), restart the
406 attempt to cherry-pick the patch, rename the file back (``git mv`` and
407 committing again), and finally squash the result using ``git rebase -i``
411 …tps://medium.com/@slamflipstrom/a-beginners-guide-to-squashing-commits-with-git-rebase-8185cf6e62ec
439 ``git diff -W`` and ``git show -W`` (AKA ``--function-context``) when
461 this would be to use ``git grep``. (This is actually a good idea to do
465 to be adjusted. ``git log`` is your friend to figure out what happened
466 to these areas as ``git blame`` won't show you code that has been
484 colordiff -yw -W 200 <(git diff -W <upstream commit>^-) <(git diff -W HEAD^-) | less -SR
494 the official `git rev-parse documentation`_.
496 .. _git rev-parse documentation: https://git-scm.com/docs/git-rev-parse#_other_rev_parent_shorthand…
498 Again, note the inclusion of ``-W`` for ``git diff``; this ensures that
580 ``git send-email --subject-prefix='PATCH 6.1.y'``), but you can also put