Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
A
attic
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
hydrargyrum
attic
Commits
69ba7341
Commit
69ba7341
authored
Jan 08, 2020
by
hydrargyrum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-cherry-pick-on-path: cherry-pick only a part of a commit
parent
28c725c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
git/git-cherry-pick-on-path
git/git-cherry-pick-on-path
+23
-0
No files found.
git/git-cherry-pick-on-path
0 → 100755
View file @
69ba7341
#!/bin/sh -e
# license: Do What The Fuck You Want To Public License version 2 [http://www.wtfpl.net/]
usage
()
{
cat
<<
EOF
usage:
$0
<tree-ish> <pathspec>...
Cherry-pick commit <tree-ish> that affects many files, but only apply to files matched by <pathspec>.
There can be multiple <pathspec> arguments.
EOF
}
if
[
$#
-lt
2
]
then
usage
>
&2
exit
64
# EX_USAGE
fi
commit
=
"
$1
"
shift
git checkout
"
$commit
"
--
"
$@
"
git commit
--reuse-message
"
$commit
"
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