Lazygit - The Best Way To Use Git On The Terminal & Neovim

Поделиться
HTML-код
  • Опубликовано: 13 авг 2024
  • Lazygit is an amazing way to use git on the terminal and has been a wonderful addition to my workflow. In this video, I go through everything you should know to get started with lazygit and how to integrate it with Neovim and the lazy.nvim plugin manager. Hope you enjoy it!
    💻 Dotfiles: bit.ly/4cFlPyq
    🎥 How I Setup Neovim: • How I Setup Neovim To ...
    🎥 How To Install Neovim Plugins With lazy.nvim: • How To Use lazy.nvim F...
    📧 Subscribe To My Newsletter: buttondown.email/josean
    ☕️ Help Support Me And The Channel: www.buymeacoffee.com/joseanma...
    ⏰ Timestamps
    00:00 - introduction
    00:30 - installation
    01:01 - overall layout
    02:00 - staging & committing
    05:29 - pushing to remote
    05:49 - branches
    06:30 - resolving merge conflicts
    08:49 - filtering
    09:08 - seeing more info/details
    10:01 - integrating with neovim
    11:20 - conclusion
  • НаукаНаука

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

  • @ykhatat
    @ykhatat Месяц назад +41

    Just a tip: Press Ctrl-Z to put nvim in background and then later type 'fg' to bring it back. No need to close and reopen it everytime. Nice video btw.

    • @joseanmartinez
      @joseanmartinez  Месяц назад +4

      I didn’t know about that, thanks!

    • @GavinBogie
      @GavinBogie Месяц назад +3

      Woah. Thanks for the tip!

    • @maguilecutty
      @maguilecutty Месяц назад +1

      Or just get the plug-in for neovim and press leader gg …

    • @MrBratkenSolov
      @MrBratkenSolov 24 дня назад +1

      use tmux to have stuff in different panes

    • @RichardAPalaciosG
      @RichardAPalaciosG 12 дней назад +1

      I started the vim world thinking it was a mistake to use Ctrl + Z, it was hard to stop using it and use "u" but now it makes sense.

  • @olearydj
    @olearydj Месяц назад +38

    Just here to say your production values set the bar for this kind of content. Outstanding.

  • @tamtamresearchs.r.o.5562
    @tamtamresearchs.r.o.5562 Месяц назад +9

    I am using lazygit since 2021. But it was worth to watch your video - well scripted, very explanatory, explains how to find your way, succinct presentation. Well done.

    • @JefCollier
      @JefCollier Месяц назад +1

      I'm in the same boat. I watched this--like many of Josean's vids--to see if I was just stuck using LG in "my way."
      I think one of the best parts of this was how he showed how to use the help screen to find commands rather than just telling you to hit "a" then "C" then "P."

  • @MangaTengu
    @MangaTengu 28 дней назад +2

    I love how you take the time to show how useful `?` is through example 👍

  • @jonathanrodriquez3775
    @jonathanrodriquez3775 Месяц назад +7

    Lazygit is sweet! Makes committing specific files so easy.

  • @maguilecutty
    @maguilecutty Месяц назад +2

    Other great things I use everyday are keybinding “o” for that will open a browser and setup a pull request for me and the stashes for moving between branches without having to stage changes :)
    I watched this vid cause I thought I’d learn something I didn’t use this tool for and it certainly hit the mark!

  • @xunliu4548
    @xunliu4548 5 дней назад

    you are an ideal coworker that I'd work with for my entire life and I won't quit my job in that case.

  • @RichardAPalaciosG
    @RichardAPalaciosG 12 дней назад

    Nice!! Thanks for the tutorial Josean.

  • @ericlindell3777
    @ericlindell3777 Месяц назад +5

    Great vid! Will definitely give lazygit a try again.

  • @myname7815
    @myname7815 Месяц назад +2

    Apart from amazing content, Looking solid man 💪

  • @NazarMalyy
    @NazarMalyy 19 дней назад

    Nice video man! I never used Lazygit to solve the merge conflicts. Thanks for explanation!

  • @yeyintaung9837
    @yeyintaung9837 18 дней назад

    Couldn't help to subscribe, great job man❤

  • @RazoBeckett.
    @RazoBeckett. Месяц назад

    I really love your video when I see notification my brains is like quality content is ready to watch.

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

    Thanks for sharing another amazing video. One tip: install delta to show git diff side-by-side with colors highlighting various changes.

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

    🙏 a lot for telling. And while I always enjoy reading another chapter in Pro Git, lazygit *does* speed up my workflow from this day 🤓

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

    Very cool!
    Thanks for showing all these features and the integration into Neovim!

  • @wulymammoth
    @wulymammoth 28 дней назад

    This works for almost any process, because prior to terminal emulators, this was one of a few ways to obtain your command prompt back and run another process while the original is suspended. If the process needs to keep running, you can bg it and then type “jobs” to list them

  • @codingwithrendi
    @codingwithrendi 26 дней назад

    Cool, this makes me so motivated to contribute to an open source project :)

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

    As always, an excellent walk-through. Thanks.

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

    My setup includes 'git flow', all within neovim of course 😎👍 Great video. Love your content amigo, Bien hecho!! Salutos

  • @tvntvn-b
    @tvntvn-b Месяц назад

    Great video! One of the other great features is the pull request. Having the branch you want to merge to checked out, navigate on the branch you want to merge and pressing ”o” will open the github PR page with some of the fields prefilled. I dont think i’ve made PRs any other way after learning about it.

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

      That’s awesome! Thanks for pointing this out too!

  • @chalmagean
    @chalmagean Месяц назад +1

    you can navigate through the panels with H/L as well (useful for vim users)

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

      Didn’t know about that, thank you for the tip!

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

    Lazygit is just amazing!!!Thanks for the video!!

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

      Awesome! Thanks for the feedback 🙏🏽

  • @LeungWong
    @LeungWong 28 дней назад

    Using lazygit plugin for neovim has some issue with escape.
    For instance when you open up lazygit with "lg" and then select a file, and press .
    Normally you need to press to go out from it, but you are unable to and the only way to get out from lg would be to exit with "q" or +c

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

    Thank you for the video. You can close lazygit by just pressing q.

  • @JIeFu-ee4xk
    @JIeFu-ee4xk Месяц назад

    Thanks ~ Wiat for so long for lazygit!!!

  • @gand0rfTRZ
    @gand0rfTRZ Месяц назад +1

    Installing once I get home!!

  • @user-tt1ru8og2n
    @user-tt1ru8og2n Месяц назад

    Thanks for the video! Super useful thing, using it every day.

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

    Noice -- best intro to Lazygit I've seen

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

      Awesome, thank you for the feedback 🙏🏽

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

    Hello,
    You read my mind, I wanted to learn how Git works, and I already like this tool ;)
    Your Neovim videos have been the main inspiration for making my Neovim config, big thanks.
    PS : Too bad I can't find kits as yours for the Corne Keyboard in France... As a European, I really feel we'll never leave the middle age in technology in EU :(

    • @joseanmartinez
      @joseanmartinez  Месяц назад +1

      Awesome, thank you for your feedback! As a very small shop, I’m only shipping to the US for now, but hope to ship to other countries in the future, sorry about that.

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

      @@joseanmartinez : Please don't be sorry about not shipping abroad. I was just referring it's hard to find tech related material in Europe on the web.
      Keep up on your videos, they are awesome :)

    • @joseanmartinez
      @joseanmartinez  Месяц назад +1

      @@Temet79 Definitely understand. Thanks so much for your feedback!

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

    Great video. You can also use delta with lazygit for better diffs

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

    Im currently happy with using commandline and DiffView in nvim but gotta try this one haha

  • @user-qt3dk1vw7c
    @user-qt3dk1vw7c Месяц назад

    I found this video really informative and enjoyable. I'm really curious about how to debug in Neovim. Do you have any plans to make a video on this topic?

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

    Great video! you are the best tutorial video I ever saw. Could you share your raycast configure?

  • @chovon
    @chovon 26 дней назад

    awesome hello can you tell me how to show the type key on screen

  • @themohmand
    @themohmand 29 дней назад

    How do you work with bare repos and manage worktrees using lazygit? This is one use case that I can’t figure out.

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

    thank you for the guide!
    I have small question, is there something like nvim cmp or treesitter inside lazygit?

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

    You can make more videos using nvim like the penultimate video.

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

    2:52 Shift-j, and S-h to scrool the sidebar.

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

    Hi Josean, you got me into configuring my terminal and nvim for the first almost a year ago, thanks for that, my whole workflow and productivity skyrocketed. I also use lazygit since the beginning. Unfortunately a feature which is really missing for me is editing / resolving merge conflicts directly using nvim from lazy git. The workflow i mean would be: 1. Open lazy inside nvim 2. Select any of the files 3. Press e (for edit) 4. And open the file within the current nvim instance (Not opening a separate nvim instance. I tried multiple solutions i found online but none of them seemed to work, do you have some tips on how to get this working or somebody else from the community. I would love to get this to work

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

    Heya, Josean.
    Your tutorials are so awesome and what's gotten me into neovim to begin with.
    You mentioned you you can scroll the unstaged changes panel with your mouse. Is there anything specific in your setup to enable this? I haven't been able to accomplish this in both lazygit and neovim (on MacOS). Thanks in advance.
    Keep up the great video quality! :)

    • @joseanmartinez
      @joseanmartinez  Месяц назад +1

      Hey! Thanks! Not sure why it might not be working for you. It has been working for me. Might have to do with mouse functionality overall in your terminal setup. I’m currently using wezterm and tmux. I have the mouse enabled within my tmux setup. Not sure if this is the solution to your issue though.

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

    There goes all my git scripts and shortcuts! Now I wish I had made my scripting this good. Thank you for showing this. By the way, I keep hoping for ":x" when you use ":w :q" 😂

    • @joseanmartinez
      @joseanmartinez  Месяц назад +1

      I definitely should use “:x” more often, I got so used to “:w” and “:q”! Happy to hear you found the video helpful!

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

    Thanks

  • @andriesvanwyk3226
    @andriesvanwyk3226 Месяц назад +2

    Thanks for the great video, Josean! How's the video platform coming along?

    • @joseanmartinez
      @joseanmartinez  Месяц назад +1

      Thanks!! Currently working on the platform, will probably take some time to finish, but excited to continue building it out!

    • @andriesvanwyk3226
      @andriesvanwyk3226 12 дней назад

      @@joseanmartinez Awesome man! Thanks for all the quality content you put out. Learning a lot and enjoying Neovim so much

    • @joseanmartinez
      @joseanmartinez  12 дней назад

      @@andriesvanwyk3226 Thank you!

  • @FrancescoM-
    @FrancescoM- 28 дней назад

    powerlevel10k have been discontinued same with yabai, can you make a video about oh my posh and an yabai alternative? like aerospace or similar?

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

    I ❤ Lazygit!

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

    Interesting. I did it a bit different in RDS.

  • @hakimakbary65
    @hakimakbary65 29 дней назад

    Hi,
    Just two questions
    1. Why your hands are so much wide open on your keyboard?
    2. What is the tool that auto-suggests the rest of the command?

    • @joseanmartinez
      @joseanmartinez  29 дней назад

      @@hakimakbary65 Hi! I use a corne split keyboard and the tool is zsh-autosuggestions.

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

    I tried to install the lazygit nvim plugin but it just wouldn't install at all. It's not even showing up on the Lazy dashboard of plugins. I guess I'm probably stuck with the GUI version.
    Otherwise excellent video as always. I guess the only tutorial left is integrating note-taking with neovim 😊.

  • @tomaszgora4353
    @tomaszgora4353 Месяц назад +1

    For a long time I've been using lazygit in a float window of toggleterm. Had some nasty keymaps conflicts (especially escape) that I had to do some bending backwards to get around ;) Does this plugin integration behave better with regards to that?

    • @joseanmartinez
      @joseanmartinez  Месяц назад +1

      From my personal experience using the plugin, I haven’t had any issues with conflicts. But I think it might depend on your workflow and setup. I recommend you try it out and see how it goes!

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

    So many keys to remember 😅

  • @mattskov2917
    @mattskov2917 23 дня назад

    What is your nvim theme

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

    commenting for the algorithm❤

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

      Thank you! Really appreciate the support

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

    You should do similar videos for lazynpm and lazydocker.

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

      Sounds good, will definitely keep it in mind. Thanks!

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

    great video

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

    This is great! Just one question. Could Delta work for the DIFFs?

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

      Yes, there is an option in config to use delta and have the side by side preview for example if you want

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

      @@danko95bgd thank you

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

    Nice 🎉

  • @codinglife391
    @codinglife391 28 дней назад

    Tell me about your font name. Thanks

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

    sadly I get used to magit in emcas so much and now I am unable to switch. So I stick to Neogit

  • @ch4o7ic8
    @ch4o7ic8 Месяц назад +1

    I cannot quiet express just how much this one peg not hanging properly in your pegboard bothers me...😶

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

    Hi Josean, Thank you for your videos. They helped us a lot. I have one issue with my NVIM telescope. When I try to work with my projects, when I try NVIM with some projects, the telescope works well and shows all the files, but when I try different projects, the telescope doesn't work. So, I moved my files from a not-working folder to a working folder, and it works well. I think the issue is with folders. What can I do to solve this issue? Thank you ❤ Update: And also there's a could not parse linter output error in my code. Can you give me some help please.

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

      I saw a friend of mine have a similar problem, in his case it was because .gitignore was misconfigured

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

    Heads up, you don't need to do "Ctrl-c" to leave lazygit, "q" also quits out

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

      Good to know, I thought “q” only worked with lazygit within Neovim, thanks!

  • @geomorillo
    @geomorillo 5 часов назад

    lazygit is also great without neovim

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

    Lazygit is good and the best way I don't think so

  • @bjarne9700
    @bjarne9700 28 дней назад

    Great showcase but what purpose does this software serve? It looks so cluttered and unnecessarily complex. Usually TUIs exist to make complex commands easy to use but this one does the opposite.

    • @madmaxdev
      @madmaxdev 23 дня назад

      Use it first.

    • @bjarne9700
      @bjarne9700 23 дня назад

      @@madmaxdev your comment provides no value. No explanation no nothing. Can you name something that’s easier to do with this software that with just the git command?

    • @madmaxdev
      @madmaxdev 23 дня назад

      @@bjarne9700 Use it first and you'll find out.

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

    Fugitive provides a much better experience in vim/neovim

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

    Tbh I felt like it's way easier learning git than doing all these circus.

    • @joseanmartinez
      @joseanmartinez  Месяц назад +1

      You should learn git before using lazygit

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

      @@joseanmartinez I already use Git and i don't find any need for lazy Git for me. As thr name says it's for lazy people haha

    • @subbunittala2012
      @subbunittala2012 28 дней назад

      @@mallukittens177 you are clown ....if you do not knwo the power of lazygit !!!