it-wiki:git:tips_and_tricks
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
it-wiki:git:tips_and_tricks [2020/06/10 12:19] – angelegt marko | it-wiki:git:tips_and_tricks [2021/11/27 06:27] (aktuell) – marko | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== Tipps und Tricks ====== | ====== Tipps und Tricks ====== | ||
+ | ===== How to can delete a remote Branch via push ===== | ||
+ | <code bash> | ||
+ | git push patches --delete patch-newModulStructure | ||
+ | </ | ||
+ | |||
===== Branchwechsel ohne commit ===== | ===== Branchwechsel ohne commit ===== | ||
Um von einem Branch X wo der Status weder im stage noch im Repositorie ist in einem anden Branch Y zu wechseln kann man | Um von einem Branch X wo der Status weder im stage noch im Repositorie ist in einem anden Branch Y zu wechseln kann man | ||
Zeile 12: | Zeile 17: | ||
git checkout branchX | git checkout branchX | ||
git stash pop | git stash pop | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | ===== selektiver merge ===== | ||
+ | <code bash> | ||
+ | git merge --no-ff --no-commit BRANCH | ||
+ | </ | ||
+ | <code bash> | ||
+ | git reset head | ||
+ | </ | ||
+ | oder | ||
+ | <code bash> | ||
+ | git reset FILE | ||
+ | </ | ||
+ | <code bash> | ||
+ | git add --interactive | ||
+ | | ||
+ | 1: unchanged | ||
+ | 2: +1/-1 nothing controls_GardenaSmartDevice.txt | ||
+ | |||
+ | *** Commands *** | ||
+ | 1: status | ||
+ | 5: patch 6: diff 7: quit 8: help | ||
+ | What now> 5 | ||
+ | | ||
+ | 1: unchanged | ||
+ | Patch update>> | ||
+ | | ||
+ | * 1: unchanged | ||
+ | Patch update>> | ||
+ | </ | ||
+ | Du siehst einen einzelnen Diff-Hunk und wirst gefragt, ob Du ihn zur Stage hinzufügen möchtest oder nicht. | ||
+ | <code bash> | ||
+ | diff --git a/ | ||
+ | index 22e3131..bd15158 100644 | ||
+ | --- a/ | ||
+ | +++ b/ | ||
+ | @@ -28,7 +28,7 @@ | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | -# $Id$ | ||
+ | +# $Id: 73_GardenaSmartBridge.pm 22957 2020-10-12 07:01:56Z CoolTux $ | ||
+ | # | ||
+ | ############################################################################### | ||
+ | ## | ||
+ | (1/13) Stage this hunk [y, | ||
+ | </ | ||
+ | |||
+ | Wähle y für hinzufügen oder n für NICHT hinzufügen. | ||
+ | |||
+ | ===== How to close an issue with a commit + push? in gitea ===== | ||
+ | < | ||
+ | fixes #1 | ||
+ | Fixes #1 | ||
+ | Closes #1 | ||
+ | closes #1 | ||
+ | fixes: #1 | ||
+ | Fixes: #1 | ||
+ | Closes: #1 | ||
+ | closes: #1 | ||
</ | </ |
it-wiki/git/tips_and_tricks.1591791542.txt.gz · Zuletzt geändert: 2020/06/10 12:19 von marko