aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/git.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tools/git.md b/src/tools/git.md
index fc640f9..eb1f633 100644
--- a/src/tools/git.md
+++ b/src/tools/git.md
@@ -51,6 +51,7 @@
git branch -d <bname> .......... delete local branch with name <bname>
git checkout <bname> ........... switch to branch with name <bname>
git checkout --track <branch> .. start to locally track a remote branch
+ git branch --unset-upstream .... unset remote tracking branch
# Remote
@@ -74,6 +75,18 @@
git push origin --tags .... push local tags to origin (or other remote)
```
+## Worktree
+Worktrees allow to maintain multiple working trees in the filesystem linked to
+the same repository (shared .git folder).
+```markdown
+ git worktree add <path> .............. create a tree at <path> with a new branch
+ checked out (bname is basename of <path>)
+ git worktree add <path> <bname> ...... create a tree at <path> from existing <bname>
+ git worktree list .................... list existing work trees
+ git worktree remove <tree> ........... remove work tree
+ git worktree prune ................... remove stale bookkeeping files
+```
+
## Log & Commit History
```markdown
git log --oneline ......... shows log in single line per commit -> alias for