From f796acf14e9be42128351ef6dc97fb23e5902cbc Mon Sep 17 00:00:00 2001 From: Martin Blazik Date: Mon, 2 May 2022 08:23:46 +0200 Subject: [PATCH] More details for git --- doc/git.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/git.md b/doc/git.md index f2e252d..e685246 100644 --- a/doc/git.md +++ b/doc/git.md @@ -1,5 +1,35 @@ # Git notes +## Rebase + +### Move part file to another commit +* rebase interactive +* edit commit +* remove lines +* commit* create new commits for squash later + + +```bash +https://rietta.com/blog/git-patch-manual-split/ +https://romanofskiat.wordpress.com/2015/05/12/git-moving-partial-changes-between-commits/ + +git commit --reuse-message=HEAD@{1} +```` + +Relative Refs +- https://www.atlassian.com/git/tutorials/refs-and-the-reflog +- https://stackoverflow.com/questions/2221658/whats-the-difference-between-head-and-head-in-git + + +``` +HEAD~1 +HEAD~ +HEAD^1 +HEAD^ +HEAD@{1} +``` + + ## Full ssh address for remote server ``` git remote set-url origin ssh://lachtan@byt13.fnet.cz:22002/home/lachtan/git/work/linux-workspace.git