Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
9
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Jamie Tanna
jvt.me
Commits
6e51e6d9
Commit
6e51e6d9
authored
Mar 26, 2020
by
Jamie Tanna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add note about using `git am` to apply the commit message
As I found that was a thing yesterday!
parent
cb75b97d
Pipeline
#129875819
passed with stage
in 3 minutes and 58 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
content/posts/2019-12-17-git-format-patch-apply-backport-replay-changes.md
...9-12-17-git-format-patch-apply-backport-replay-changes.md
+8
-2
No files found.
content/posts/2019-12-17-git-format-patch-apply-backport-replay-changes.md
View file @
6e51e6d9
---
title
:
"
Backporting/Replaying
Changes
using
`git
format-patch`
and
`git
apply`"
description
:
"
Using
`git
format-patch`
and
`git
apply`
to
apply
a
patch,
if
`git
cherry-pick`
isn't
available."
title
:
"
Backporting/Replaying
Changes
using
`git
format-patch`
and
`git
apply`
/
`git-am`
"
description
:
"
Using
`git
format-patch`
and
`git
apply`
/`git
am`
to
apply
a
patch,
if
`git
cherry-pick`
isn't
available."
tags
:
-
blogumentation
-
git
...
...
@@ -66,4 +66,10 @@ And then we can then feed this file into `git apply`:
$
git apply < patch
```
However, this doesn't quite work when you want to use the commit message, too. For this, we can use
`git am`
:
```
sh
$
git am < patch
```
This _may_ have issues if the patch doesn't apply cleanly, but once resolved, you'll have the commit applied with patch and commit message!
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment