How I use Git Worktrees in my developer workflow

Поделиться
HTML-код
  • Опубликовано: 28 дек 2024

Комментарии • 19

  • @sebastianmangelsen8056
    @sebastianmangelsen8056 Год назад

    thanks for sharing this slick and neat approach working with git worktrees. I really appreciate it.

  • @frozen_tortus
    @frozen_tortus 8 месяцев назад

    I learned a more then few things in your video Nick. Thanks for being awesome.

  • @svenkicherer
    @svenkicherer 9 месяцев назад +2

    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.

  • @plouf1969
    @plouf1969 Месяц назад

    Hows that different from cloning the repo several times in different folders?

  • @TheDidijones
    @TheDidijones Год назад +1

    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.

    • @NickNisi
      @NickNisi  11 месяцев назад

      I’ll work on a more recent video but my config is available here: github.com/nicknisi/dotfiles

  • @jonathaneidelman3132
    @jonathaneidelman3132 5 месяцев назад

    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.

    • @hardboiledPhil
      @hardboiledPhil Месяц назад

      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

  • @SajidAliSoftwareEngineer
    @SajidAliSoftwareEngineer 5 месяцев назад

    hey Nick I am getting base.config not found while setting up your dotfiles in wezterm. can you please help to resolve

  • @jayachar6944
    @jayachar6944 Год назад

    Thanks for sharing Nick! How to do you deal with gitignored files - e.g. .env - when you quickly want to add a worktree branch?

    • @NickNisi
      @NickNisi  11 месяцев назад +2

      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.

    • @jR-tm3ko
      @jR-tm3ko 2 дня назад

      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)" :)

  • @flywithoutwingss
    @flywithoutwingss Год назад

    Any chance to show/explain your configuration for tour terminal, tmux an dlld neovim?

    • @NickNisi
      @NickNisi  11 месяцев назад

      Yeah my whole config is here: github.com/nicknisi/dotfiles

  • @Sailor_Z
    @Sailor_Z 6 месяцев назад

    Why do we need bare flag? I haven't wrapped my head around that part

    • @hardboiledPhil
      @hardboiledPhil Месяц назад

      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

  • @charlottaspidell605
    @charlottaspidell605 Год назад

    😍 Promo sm