2:40 is there any reason why you specify a gitdir in a .git file and do not do the bare checkout to .git? tested it under windows and it works. don't know how it behaves on linux / mac.
Good morning, Is it possible to make one or more videos to explain to us how to customize our terminal/tmux/neovim to achieve a result similar to yours please? Thank you and have a nice day.
If I follow the suggested branch defaults then it doesn't seem to create them mapped to the correct branch but it's easy to fix. Also I didn't think that it liked bare clones - need to test this manual worktree creation to see if it can handle it
Great question. I’ve mostly worked them out of the directory whenever possible, but for ones I can’t I just copy them in each time. Not the best solution, I know.
unsure if you are still using worktrees or if you have an already working solution, but for me I use git hooks, specifically post-checkout. I store my .env (or whatever file(s) you need in a specific dir, eg. $HOME/work-config. then in my git hook I specify "cp $HOME/work-config/xxxx "$(pwd)" :)
You can not supply the bare flag but then you'll have a copy of the code in the root of the directory and especially if you want to have folders for different worktrees they'll all end up in the same place and confusing/harder to find what you need
thanks for sharing this slick and neat approach working with git worktrees. I really appreciate it.
I learned a more then few things in your video Nick. Thanks for being awesome.
2:40 is there any reason why you specify a gitdir in a .git file and do not do the bare checkout to .git? tested it under windows and it works. don't know how it behaves on linux / mac.
same question
Hows that different from cloning the repo several times in different folders?
Good morning,
Is it possible to make one or more videos to explain to us how to customize our terminal/tmux/neovim to achieve a result similar to yours please?
Thank you and have a nice day.
I’ll work on a more recent video but my config is available here: github.com/nicknisi/dotfiles
Great workflow thanks for sharing!
Have you used lazygit's worktrees feature? seems great but haven't been able to get it to work as I intend it to.
If I follow the suggested branch defaults then it doesn't seem to create them mapped to the correct branch but it's easy to fix. Also I didn't think that it liked bare clones - need to test this manual worktree creation to see if it can handle it
hey Nick I am getting base.config not found while setting up your dotfiles in wezterm. can you please help to resolve
Thanks for sharing Nick! How to do you deal with gitignored files - e.g. .env - when you quickly want to add a worktree branch?
Great question. I’ve mostly worked them out of the directory whenever possible, but for ones I can’t I just copy them in each time. Not the best solution, I know.
unsure if you are still using worktrees or if you have an already working solution, but for me I use git hooks, specifically post-checkout. I store my .env (or whatever file(s) you need in a specific dir, eg. $HOME/work-config. then in my git hook I specify "cp $HOME/work-config/xxxx "$(pwd)" :)
Any chance to show/explain your configuration for tour terminal, tmux an dlld neovim?
Yeah my whole config is here: github.com/nicknisi/dotfiles
Why do we need bare flag? I haven't wrapped my head around that part
You can not supply the bare flag but then you'll have a copy of the code in the root of the directory and especially if you want to have folders for different worktrees they'll all end up in the same place and confusing/harder to find what you need
😍 Promo sm