]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: git-worktree: Add side by side branch checkout example
authorMichal Suchanek <msuchanek@suse.de>
Fri, 10 Oct 2025 17:04:58 +0000 (19:04 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Oct 2025 18:20:26 +0000 (11:20 -0700)
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-worktree.adoc

index 05cc8c393311200472eaa51703780397ca944fb4..692e81fe3a1f411144a1be635f92d3903e7aba50 100644 (file)
@@ -522,6 +522,16 @@ $ popd
 $ git worktree remove ../temp
 ------------
 
+Side by side branch checkouts for a repository using multiple worktrees
+
+------------
+mkdir some-repository
+cd some-repository
+git clone --bare gitforge@someforge.example.com:some-org/some-repository some-repository.git
+git --git-dir=some-repository.git worktree add some-branch
+git --git-dir=some-repository.git worktree add another-branch
+------------
+
 BUGS
 ----
 Multiple checkout in general is still experimental, and the support