Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung Letzte Überarbeitung Beide Seiten, nächste Überarbeitung | ||
pr:git-stuff [2017/04/12 17:00] martok |
pr:git-stuff [2019/12/07 15:15] martok git-pickbranch |
||
---|---|---|---|
Zeile 5: | Zeile 5: | ||
GIT_AUTHOR_DATE='Wed Dec 19 15:14:05 2029 -0800' git commit -m 'future!' | GIT_AUTHOR_DATE='Wed Dec 19 15:14:05 2029 -0800' git commit -m 'future!' | ||
GIT_AUTHOR_DATE='2029-12-19 15:14:05 -0800' git commit -m 'future!' | GIT_AUTHOR_DATE='2029-12-19 15:14:05 -0800' git commit -m 'future!' | ||
- | GIT_AUTHOR_DATE='`date -Iseconds -u -R "oldest file"`' git commit -m 'past!' | + | GIT_AUTHOR_DATE="`date -Iseconds -u -r 'oldest file'`" git commit -m 'past!' |
</code> | </code> | ||
Zeile 64: | Zeile 64: | ||
<code powershell> | <code powershell> | ||
(git ls-files) | % { (Get-Item $_).LastWriteTime=(git log --pretty=format:%cd -n 1 --date=iso $_) } | (git ls-files) | % { (Get-Item $_).LastWriteTime=(git log --pretty=format:%cd -n 1 --date=iso $_) } | ||
+ | </code> | ||
+ | |||
+ | ===== Development branch in einen neuen für PR interaktiv rekonstruieren ===== | ||
+ | |||
+ | <code bash>git-pickbranch develop master my-new-pr</code> | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | set -e | ||
+ | |||
+ | FB=$1 | ||
+ | START=$2 | ||
+ | TAIL=$3 | ||
+ | # switch to feature branch, make it point to last of set | ||
+ | git checkout $FB | ||
+ | git reset --hard $TAIL | ||
+ | # rebuild between first and last as feature branch, branching on start | ||
+ | git rebase -i --onto $START $START $FB | ||
</code> | </code> | ||