How to Use Git Worktree | Checkout Multiple Git Branches at Once

preview_player
Показать описание
Watch this step-by-step tutorial to learn how to leverage Git worktree and speed up your workflow. This video includes a Git worktree example, so you can learn how to use this feature to checkout and work on multiple Git branches simultaneously. We will also cover how to use Git worktree list, Git worktree add, and Git worktree remove, and provide a few tips to simplify managing multiple branches at once.

Navigate with chapters:
0:00 Git Worktree Introduction
0:17 Use Case for Git Worktree
1:48 Git Worktree Concept Explained
2:59 Git Worktree List
3:16 Git Worktree Add
5:49 Git Worktree Remove
7:33 Using Worktrees in GitLens+

#gitworktree #gitworktreeexample #gitworktreeadd #gitworktreelist #gitworktreeremove #howtousegitworktree #git #gitlens #vscode
Рекомендации по теме
Комментарии
Автор

I really like your presentation style and especially that you show the actual underlying git commands.

ChristerBlomqvist
Автор

This is really what I was looking for to implement in git repositories, work in multiple branches at the same time in my engineering projects !! Thank you ! :)

ElHombreDelSaco
Автор

Great presentation. Howveer I find git worktrees pretty useless, especially when working on huge projects with heavy IDEs.
I'd rather just commit all changes, use a descriptive commit message, chenge branch and fix whatever bug needs to be fixed, and then just check out the original branch and git reset --soft HEAD~1 and continue working on whatever feature I was working on before.

HunterRoMike
Автор

You saved me from getting lost in stashes and temporary local branches, thanks a lot!

mateustymoniuk
Автор

Thank you for this tutorial, it makes years I was looking for that feature!

ahirusan
Автор

Useful tutorial, especially because you showed how things work in the background, that is, via the command line. Thanks!

bassam.
Автор

thank you, simple and to the point :)

a_maxed_out_handle_of__chars
Автор

Pretty neat. I hate stash as I can forget about it. I often create a new branch for temporary commits.

chrisidema
Автор

How is that different from cloning the repository again into a separate folder ?

amansagar
Автор

I don't understand how the new work tree relates to remote. can you explain how can I push this worktree, create a pr on branches there later, etc.

yoavgro
Автор

great video.However I think commit with a message and after use squash it is more practical than using worktree

gersonscheffer
Автор

Why does everyone use a terminal instead of a built-in vscode git GUI?

danylohromyak
Автор

Does GitKraken support worktrees? I made a new worktree from the command line called `main`, and I can push pull fetch etc. just fine from the CLI. But when I open the repo in GitKraken and try to push or pull I get the following error: `could not determine remote for 'refs/remotes/origin/main'`

jacques-dev
Автор

How would you link your node_modules with a new branch to avoid reinstalling deps?

kristupasqwert
Автор

1:10
1:22
2:50 3 git worktree commands
3:02 git worktree list
3:16 git worktree add
6:13 git worktree remove

ruixue
Автор

how is this better than simply cloning to a different folder? less mental load.

dannywidjaya
Автор

I am very surprised how annoyed I get by there being no space at the end of PS1.

apefu
Автор

I'm annoyed by the `~` in your command line when you're not actually in your home directory.

plopplop.