The Holy Grail of Neovim Git Integrations

  Рет қаралды 44,376

DevOps Toolbox

DevOps Toolbox

Күн бұрын

Пікірлер: 116
@guglielmobartelloni
@guglielmobartelloni 9 ай бұрын
With the Lazygit neovim plugin there is no context switch and you can do all the things mentioned.
@devopstoolbox
@devopstoolbox 9 ай бұрын
I should have included it here but while it is great(!) I still feel it’s a bit of a context switch and not as smooth
@CristianHeredia0
@CristianHeredia0 9 ай бұрын
Agreed, switching/merging/creating/deleting branches is so seamless in Lazygit with plugin. That feature alone is worth the price of admission. Also viewing merging/squashing/amending commits so easy with lazygit.
@benfrainuk
@benfrainuk 9 ай бұрын
Yes. 100%. And I might be odd but actually find/want a bit of context change. I find it helpful. I am context switching when I am dealing with VC and the float window gives me just enough separation.
@karesztrk
@karesztrk 9 ай бұрын
I do agree as well
@po6577
@po6577 7 ай бұрын
Lazygit are truly the best without much or not even a learning curve
@VitorF7
@VitorF7 9 ай бұрын
I heavily use lazygit in my Neovim set-up, especially since in my team we use conventional commits and use a tool called czg that helps with writing the conventional commit messages. So in lazygit I added a key binding for capital Z to launch the czg for the commit message and it is super fast and really helpful.
@devopstoolbox
@devopstoolbox 9 ай бұрын
That’s super cool! I love it that you can customize it like that
@Redyf
@Redyf 7 ай бұрын
I had no idea about czg, thanks for the tip!
@ascourter
@ascourter 9 ай бұрын
Ok I'm installing Neogit today. Thanks for the video Omer!
@nickmills8476
@nickmills8476 9 ай бұрын
big fugitive fan, but neogit is beckoning
@fib4983
@fib4983 9 ай бұрын
Thank you for compiling lots of up to date options. Very interesting
@misterlinuxfriendly947
@misterlinuxfriendly947 9 ай бұрын
I find I'm getting by with gitsigns, for now, but its nice to see alternatives! Thanks!
@driden1987
@driden1987 9 ай бұрын
Been using lazygit for a couple of years now, but ngl neogit looks so good. Reminds me a bit of magit
@devopstoolbox
@devopstoolbox 9 ай бұрын
It was inspired by Magit :)
@driden1987
@driden1987 9 ай бұрын
@@devopstoolboxThanks for sharing these plugins!!
@theherk
@theherk 9 ай бұрын
I absolutely love neogit. Used magit for years. But i still use lazygit about 50/50. Partly because it is editor independent and partly because its commit copy paste, rebasing, and moving are super slick. But in general I like neogit the most.
@lpanebr
@lpanebr 9 ай бұрын
Cool! I'll give NeoGit a try! Thanks!
@adinsdvoin
@adinsdvoin 5 ай бұрын
You missed an important feature of neogit: the commit-ish item under the cursor will get passed to the popup! So, `ll` to open the log, then `bb` will let you check out the selected commit. This pattern works all over :)
@devopstoolbox
@devopstoolbox 5 ай бұрын
@@adinsdvoin 1. Nice! I didn’t know about it 2. How often do you find yourself checking out a specific commit in the history? I think for me this is quite rare
@conradparker3761
@conradparker3761 3 ай бұрын
I have been using neogit for years and just learned you could use bb tysm for your comment
@adamwatkins3447
@adamwatkins3447 3 ай бұрын
Neogit may provide magit like functionality in vim, definitely checking that out. Thanks for the video!
@alexpan4987
@alexpan4987 4 ай бұрын
Thanks for the video! I try neogit every once in a while but always miss git blame and general interactiveness. You see the list of stashes but you can't actually see what in there. Or in git logs: I can't do anything meaningful, for example I'd like to press on the diff and jump to a full version of file. Or if you choose to filter log by a directory you, then you can't even see the diffs. Something you can easily do with vim-flog which integrates beautifully with fugitive and you're getting the full IDE experience.
@adinsdvoin
@adinsdvoin Ай бұрын
Sure you can - every popup uses whatever is under the cursor in the log as input for each action. And on a stash shows what it is 😅
@lllです
@lllです 9 ай бұрын
Hey, nice video! really inspired me to stop using cli for every git command and it's been amazing :) At first I couldn't make 'neogit commit' work out-of-the-box. I thought that since I'm using Nvchad, somehow that configuration was messing up with neogit. After spending a lot of time (maybe there are better/simplier solutions) I change the following: 1. Add an autocmd that start a nvim server in my init.lua with 'vim.api.startserver('path')'. 2. Edit the client.lua file from the neogit config directory in the line 53. I manually added a path to 'fn.startserver('path)'. In both cases I had to specify the server path (in my case /tmp/nvim.socket and /tmp/neogit.socket). Again, idk why the default parameters of vim.api.startserver() didn't work.
@HRB35
@HRB35 9 ай бұрын
can you teach me how you opened that url picker at 4:43? is that a telescope extension?
@devopstoolbox
@devopstoolbox 9 ай бұрын
Of course: github.com/wfxr/tmux-fzf-url All in my config: github.com/omerxx/dotfiles/blob/master/tmux/tmux.conf
@Nicfallenangel
@Nicfallenangel 9 ай бұрын
I love NeoGit, however the last time I used it, there were a few optios that weren't implimented in the plugin still. That ultimately pushed me back to lazygit in a tmux pop-up to handle my git workflow. It might be time to give neogit another run through.
@devopstoolbox
@devopstoolbox 9 ай бұрын
Yep! And apparently there’s now a lazygit nvim plugin with seamless integration
@sarojregmi200
@sarojregmi200 9 ай бұрын
Perfect timing of the video, just went through a small git merge managed to successfully break the code with git and had to revert reset hard. Vim fusitive is hard at least for me for merging.
@LeviNotik
@LeviNotik 9 ай бұрын
What plug-in or config is he using to open that floating "Cmdline" input where he types "DiffViewOpen" at 8:56?
@LeviNotik
@LeviNotik 9 ай бұрын
Oh looks like that's noice? Noiceeee
@joannes86
@joannes86 9 ай бұрын
3:58 (off topic - maybe for a next video) - Which nvim plugin do you use to show links in markdown without [name](url) and the icon on the right?
@devopstoolbox
@devopstoolbox 9 ай бұрын
I'm using Obsidian for notes and it's nvim plugin is configured to load on all markdown files. It has a nice concealer taking care of links, lists, etc. I made a video about it - kzbin.info/www/bejne/a5nXaYGPoLpsrbMsi=L6iBbzyNJ_u0Vt7L This is the plugin: github.com/epwalsh/obsidian.nvim
@joannes86
@joannes86 9 ай бұрын
Thanks! Great videos!
@nagkanya
@nagkanya 9 ай бұрын
Awesome video, thank you for this
@peterhorton9063
@peterhorton9063 9 ай бұрын
Awesome. I'm curious how you did the pull-request flow on push. Can you elaborate more on that process?
@devopstoolbox
@devopstoolbox 9 ай бұрын
You mean the PR link? When pushing with fugitive it shows the response from the platform , so when GitHub sends back a url with a PR I use Tmux URL plugin to fetch whatever it finds on screen and then hit it to pop the PR page
@rezhaadriantanuharja3389
@rezhaadriantanuharja3389 2 ай бұрын
Focus switch is also the main reason one should never include a video in a presentation. Notice in a class of a seminar, the moment the presenter says "now let's watch this video" everyone suddenly sit back, drink water, or simply start chatting with each other
@devopstoolbox
@devopstoolbox 2 ай бұрын
100%! thanks!
@markus-sagen
@markus-sagen 9 ай бұрын
So nvim finally has magit
@devopstoolbox
@devopstoolbox 9 ай бұрын
Totally
@caoticus
@caoticus 6 ай бұрын
What is that cmdline pop up thing ?
@devopstoolbox
@devopstoolbox 6 ай бұрын
I'm assuming you're referring to Noice.nvim
@caoticus
@caoticus 6 ай бұрын
@@devopstoolbox, yeah thanks.
@be_pie_today
@be_pie_today 9 ай бұрын
I prefer using plain git commands for most tasks, except for browsing history and maybe blame. All those tools just seem counter productive when I use them
@devopstoolbox
@devopstoolbox 9 ай бұрын
Yep, we’re not all the same! I figured most of my git ops are the quickest when using something lean from within Neovim
@JoshMedeski
@JoshMedeski 9 ай бұрын
I love Magit in Emacs and had been hoping someone would create a decent alternative for Neovim. I think Neogit offers a great alternative!
@adschem
@adschem 6 ай бұрын
How do you solve conflicts in neogit
@devopstoolbox
@devopstoolbox 6 ай бұрын
I think it's mentioned in the video, I use something outside neogit - vdiffsplit and a bunch of bindings to help me pick through a 3 way split
@adschem
@adschem 6 ай бұрын
@@devopstoolbox thank you! I was going similar using fugitive just wondering if anyone else had found a way to swap it out entirely. Thanks for the reply!
@johnsci911
@johnsci911 8 ай бұрын
Switched to neogit, thanks it's awesome. but can anyone have an idea (plugin) to create a branch without typing in `git checkout -b branchname`?
@devopstoolbox
@devopstoolbox 8 ай бұрын
On most of my projects I use git trees on a bare repo, and then use the primeagens plugin to create and manage them, I’ve got a video about it too
@adinsdvoin
@adinsdvoin 5 ай бұрын
Use the branch popup, `b` to create branches :)
@frankslsh
@frankslsh 9 ай бұрын
Maybe a little off topic but I often find very difficult to beat gitk for branch integrations. As a sort of team leader I often need to validate before integrating many branches into master by performing code reviews, view diffs, etc. I wonder which tools big code integrators like Linus use to perform these tasks. I'll give lazygit a try because it has the 'a' flag which is equivalent to "gitk --all" that is probably the command I use the most
@devopstoolbox
@devopstoolbox 9 ай бұрын
Maybe gh dash can help with lots of branches diffs and PR management - gh-dash on GitHub
@frankslsh
@frankslsh 9 ай бұрын
@@devopstoolbox Thanks for the tip, unfortunately we do not use github for repo storage, I generally do this integrations locally on my pc
@devopstoolbox
@devopstoolbox 9 ай бұрын
@@frankslsh I see. My favorite way is actually running a worktree structure and then opening multiple buffers / splits with different trees for comparison. Diffview serves as the actual diff visualizer
@adrianmazaev192
@adrianmazaev192 6 ай бұрын
how do you merge conflicts with neogit now that you removed fugitive ?
@devopstoolbox
@devopstoolbox 6 ай бұрын
When it’s bad enough I still use vdiffsplit I think I mentioned it in the last part
@rossvold
@rossvold 9 ай бұрын
I use fugitive instead of lazygit because of less visuals, it's a really really good plugin!
@devopstoolbox
@devopstoolbox 9 ай бұрын
Couldn’t agree more
@nickmills8476
@nickmills8476 9 ай бұрын
100% but neogit might take the crown
@rossvold
@rossvold 9 ай бұрын
In terms of usage? @@nickmills8476
@pranavbobde2529
@pranavbobde2529 6 ай бұрын
where did that Open URL pop up came from?😳
@devopstoolbox
@devopstoolbox 6 ай бұрын
Haha that's Tmux URLs plugin!
@tridibbiswas3361
@tridibbiswas3361 9 ай бұрын
Thank you for the video. A newbie question who is trying to set up neovim from scratch onmy first mac - would you mind sharing the config files for your setup neovim and tmux - would like to refer to it and take inspiration. BTW would also like to know how to get the fancy icons on your tmux , color scheme and fonts
@devopstoolbox
@devopstoolbox 9 ай бұрын
Of course! dotfiles.omerxx.com It’s all there
@zherka_pill
@zherka_pill 5 ай бұрын
neogit is magit for nvim
@devopstoolbox
@devopstoolbox 5 ай бұрын
@@zherka_pill absolutely. It even says so in the README :)
@JasonJurotich
@JasonJurotich 9 ай бұрын
Sorry, could you share your neovim config, would be nice to review it and see how to configure things better. thanks
@devopstoolbox
@devopstoolbox 9 ай бұрын
Of course! dotfiles.omerxx.com It’s all there
@JasonJurotich
@JasonJurotich 9 ай бұрын
thanks!! was able to take a few things from it. Keep it up!@@devopstoolbox
@danieljeremia1410
@danieljeremia1410 9 ай бұрын
That status bar looks amazing. Can you share your config for that status bar?
@devopstoolbox
@devopstoolbox 9 ай бұрын
Everything is in my dotfiles! dotfiles.omerxx.com You’ll find both the lua line config and Tmux!
@WalterBoring
@WalterBoring 6 ай бұрын
How do you get the popup to enter the neogit command? You went too quickly in the video and didn't explain how that worked?
@devopstoolbox
@devopstoolbox 6 ай бұрын
Sorry, not sure which part but, leader+gs starts Neogit with the status panel while leader leader+gc pops the commit menu. Everything is on my dotfiles if you want it: dotfiles.omerxx.com
@Redyf
@Redyf 7 ай бұрын
Does neogit feels laggy on large repos?
@devopstoolbox
@devopstoolbox 7 ай бұрын
I am working with large repos (Kubernetes) but not actually making commits, I did use it for branches and other local use and didn't see anything out of the order
@Redyf
@Redyf 7 ай бұрын
@@devopstoolbox Thanks! I've tried neogit in the past but eventually switched to lazygit (which is really good too) but I might give neogit a another chance to see how it feels.
@editin232
@editin232 9 ай бұрын
Can you make a tutorial on how to use dandavison/delta for nicer view of diffs in lazyGit? I think that is a good thing people from VS Code (like myself) would are used to and would really like in lazyGit.
@devopstoolbox
@devopstoolbox 9 ай бұрын
Diff view should take care of that for you! Super easy to use!
@laughingvampire7555
@laughingvampire7555 9 ай бұрын
Removing distractions and keep focus is why Emacs users do everything in Emacs. For git we use Magit (pronounce like Magic) and you stay in emacs, full control of everything.
@adibhanna
@adibhanna 9 ай бұрын
great video as usual!
@rickdg
@rickdg 9 ай бұрын
Title has a typo on integrations 👀
@devopstoolbox
@devopstoolbox 9 ай бұрын
Thank you!! It never ceases to amaze me how many thousands can watch it without noticing (or bothering to comment 😂) 🙏🏽
@editin232
@editin232 9 ай бұрын
In my opinion lazyGit is not any more context switching that any of the options showcased in the video.
@devopstoolbox
@devopstoolbox 9 ай бұрын
We’re not all wired the same 😎
@DanielRicardo-qb6ho
@DanielRicardo-qb6ho 7 ай бұрын
I have a dream of a diffview for PRs that would also allow me to write comments and send them straight to GitHub / GitLab - this is the final missing link for my Neovim / Git integration.
@devopstoolbox
@devopstoolbox 7 ай бұрын
Maybe this is what you're looking for? github.com/dlvhdr/gh-dash
@tspindouble
@tspindouble 7 ай бұрын
For GitHub you can do this with gh.nvim or octo.nvim
@tspindouble
@tspindouble 7 ай бұрын
I also recently came across danobi/prr on GitHub which is a different take on the problem: it's based around writing comments into a diff file and then running a CLI to submit them as a PR review - so it's editor-agnostic
@alihammadshah
@alihammadshah 2 ай бұрын
Yo are you omer creator of sessionx?
@devopstoolbox
@devopstoolbox 2 ай бұрын
@@alihammadshah yup :)
@alihammadshah
@alihammadshah 2 ай бұрын
@@devopstoolbox Great software, i use it everyday.
@NormalNvim
@NormalNvim 9 ай бұрын
All of them included in NormalNvim!
@luiscampos6064
@luiscampos6064 9 ай бұрын
Silly canonical question: Does TUI refer to "Text User Interface" or "Terminal User Interface"? Taking notes here and...it's a reasonable doubt, okay? Great content. Bye bye!
@r2-p2
@r2-p2 9 ай бұрын
Onye neogit fixes those show stopping bugs it might be something but for now, each time a conflict appears, the status view is broken. Wtf
@devopstoolbox
@devopstoolbox 9 ай бұрын
Interesting I didn’t see that, will try lay with conflicts again
@health_doc
@health_doc 5 ай бұрын
I prefer fork (not vim) any day especially since i have 50+ projects
@PeterSzaszvari-b8h
@PeterSzaszvari-b8h 3 ай бұрын
So only the shiny button breaks your focus. Remembering strange abbreviations not. I see!
@MrLotrus
@MrLotrus 9 ай бұрын
Maybe with git blame i could move to neogit. For now fugitive is ok.
@freeFHH
@freeFHH 7 ай бұрын
neogit is very similar to magit
@devopstoolbox
@devopstoolbox 7 ай бұрын
Indeed! It's inspired by magit!
@karesztrk
@karesztrk 9 ай бұрын
Maybe its just me but anything else other than Lazygit is friction 😅b
@devopstoolbox
@devopstoolbox 9 ай бұрын
As the saying goes: YMMV 😉
@r2com641
@r2com641 7 ай бұрын
Neogit is buggy and freezes often for no reason
@devopstoolbox
@devopstoolbox 7 ай бұрын
Hmmm.. I've been using it fulltime for a good few months and never had it freezing up on me. Maybe a buggy version?
@usefulknowledge6074
@usefulknowledge6074 6 ай бұрын
This video feels like it was written by ChatGPT given how long-winded it is.
@RazoBeckett.
@RazoBeckett. 9 ай бұрын
hi
Code Formatting made easy
9:47
TJ DeVries
Рет қаралды 16 М.
Five Terminal Applications I CAN'T Live Without
11:28
DevOps Toolbox
Рет қаралды 27 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
I Used ONLY A Keyboard For 30 Days - Here's What I Found!
8:23
DevOps Toolbox
Рет қаралды 15 М.
The Holy Grail of Neovim Note Taking
14:38
DevOps Toolbox
Рет қаралды 358 М.
Git Worktrees and Neovim: A Match Made in Coding Heaven
9:53
DevOps Toolbox
Рет қаралды 32 М.
Neovim and Git: SOLVED
8:03
typecraft
Рет қаралды 79 М.
Wrapping your favorite CLI in neovim
26:15
senkwich
Рет қаралды 8 М.
I'm never using Git the same way again
11:19
typecraft
Рет қаралды 97 М.
I'm never using .env files ever again
11:16
DevOps Toolbox
Рет қаралды 42 М.
Advent of Neovim: Why Neovim?
10:21
TJ DeVries
Рет қаралды 47 М.
(Neo)Vim Made Me a Better Software Developer
40:27
vim-jp
Рет қаралды 42 М.
Lazygit - The Best Way To Use Git On The Terminal & Neovim
11:47
Josean Martinez
Рет қаралды 74 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН