Skip to content

Commit fbb1079

Browse files
committed
Create README.md
1 parent abb6753 commit fbb1079

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# gitpatcher
2+
gitpatcher is a Gradle plugin that can manage patches for Git repositories for you ([example]). This is useful if you need a few smaller changes for a Git repository that can't be contributed upstream, but you still easily want to keep up to date with upstream.
3+
gitpatcher manages a local submodule as base, and applies patches from a configurable folder in an extra repository. It runs fully on Java using [jgit].
4+
5+
# Installation
6+
1. Add a submodule for the project you want to patch.
7+
2. Apply gitpatcher to your Gradle project:
8+
9+
```gradle
10+
plugins {
11+
id 'net.minecrell.gitpatcher' version '<version>'
12+
}
13+
```
14+
3. Configure gitpatcher:
15+
16+
```gradle
17+
patches {
18+
// The submodule path you just created
19+
submodule = 'upstream'
20+
// The target folder for the patched repositories
21+
target = file('target')
22+
// The folder where the patches are saved
23+
patches = file('patches')
24+
}
25+
```
26+
4. That's it! Now you can initialize your repository (see below) and start making commits to it. Then just make the patches and you can apply it to the target repository as often as you want.
27+
28+
# Tasks
29+
|Name|Description|
30+
|----|-----------|
31+
|`updateSubmodules`|Initializes the submodule and updates it if it is outdated.|
32+
|`applyPatches`|Initializes the target repository and applies the patches from the patch folder.|
33+
|`makePatches`|Creates or updates the patches in the patch folder.|
34+
35+
[example]: https://github.com/LapisBlue/Pore/tree/master/patches
36+
[jgit]: https://eclipse.org/jgit/

0 commit comments

Comments
 (0)