чување c80752f8e67d7386c3861d11c68df96c40781ea5
родитељ bafe45e64918da8bb09abe5c451ba55a5bfb84a2
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Mon, 27 May 2024 23:54:59 +0200
HACKING: Refine the got instructions
Diffstat:
| M | HACKING | | | 33 | ++++++++++++++++++++++++++------- |
измењених датотека: 1, додавања: 26(+), брисања: 7(-)
diff --git a/HACKING b/HACKING
@@ -55,25 +55,44 @@ Note: to my knowing so far, got doesn't support git's email-based workflow; the
closest thing to git email patches made by git-format-patch(1) is the output of
`got diff -d`.
-With got:
+
+* Option 1
+
+ Since the repository directory (**not** the work tree directory!) is a bare
+ git repository, from the repository directory issue the git command
+
+ $ git format-patch master..my_feature --stdout > my_feature.patch
+
+ similar to the one described above in "Creating customizations (git)". This
+ option actually needs to have git installed.
+
+
+* Option 2
+
+ With got:
$ got branch my_feature # if the branch doesn't already exist
$ got update -b my_feature # if it does
-and after making changes:
+ and after making changes:
$ got add -R .
$ got commit
- $ got diff -d master my_feature > my_feature.patch
+ $ got diff -d master my_feature > my_feature.diff
-You can then send the file my_feature.patch by email to my public inbox at
+ The .diff file can be converted to the format digestable by git-am, for
+ example using the script gotfp[1] and sent with the ending .patch to the same
+ address as above:
~strahinja/public-inbox (replace_with_at_sign) lists.sr.ht
-To update the branch holding your feature when the upstream changes, you can
-instead do:
+ To update the branch holding your feature when the upstream changes, you can
+ instead do:
$ got update -b master
$ got rebase my_feature
- $ got diff -d master my_feature > my_feature.patch
+ $ got diff -d master my_feature > my_feature.diff
+
+ and convert the .diff file to .patch.
+[1]: https://git.sr.ht/~strahinja/dotfiles/tree/master/item/bin/gotfp