 Git is one of the most important tools on Linux, whether you're a developer or otherwise. And I say this because a lot of people, even if they don't spend all their day coding, use Git to share and backup their .files on places like GitHub or GitLab. No matter your skill level when it comes to Git, there are tools that make using Git and interfacing with those sites much easier. I've talked about a couple of them before. I've talked about the GitHub desktop application that is designed and produced by GitHub. And I've talked about Gitcrackin before. Both of those are GUI applications that interact with GitHub and GitLab through the Git interface. Now, if you've watched this channel for any amount of time, you know that I'm a bit of a nerd and I prefer to use tools that are in the terminal, whether that is a command line interface or a terminal user interface. I prefer using tools like that. Now today I'm going to be taking a look at a program called LazyGit. Now LazyGit has been around for quite a while and it is a terminal user interface that allows you to interact with Git and all of your Git repositories in a very efficient manner. So let's go ahead and take a look at LazyGit. So this here is LazyGit and this application is a very powerful tool when it comes to using Git. And one of the reasons why it's so cool really isn't because it does all the stuff that Git does, even though it does do those things, but it does it in conjunction with showing you a lot of information all at once. So you get all of the files that are a part of the repository that have been changed up at the top. And then you have the branches for the repository that you're in, the commit history for the repository that you're in. So you can tab down to this third part here and go through the commit history from this particular repository. And you can see all of the diffs in the main window here on the right hand side. And if you wanted to restore one of those things, you could. If you wanted to just kind of see where the repository has been over the course of the last few commits, you can do that as well. You can also see all the files that you have on stash. Basically stash just means things are placed off to the side and don't have a impact on the repository, whether you're pushing, pulling, whatever. I'm sure that's very simplistic from my understanding. It probably is more complicated than that, but that's the way that I use it. Now, like I said, the real power behind lazy Git is that it shows you all of this information all at once. So you can scroll down using the arrow keys in this first file section. And you can kind of see all of the changes that have been made to all these particular files. So most of these have just been moved to a different directory. Some of them are like this one here that have a whole bunch of changes because they're actually brand new files. And you can use the spacebar to commit or decommit these files if you want. You can add them all, whatever you want to do. And then when you're ready, you can commit them, you can push them or whatever. You can also pull stuff if the repository that you have on your computer is out of sync from the one that is online, you can do a pull just like you would normally get with Git. So let me show you what that looks like. I'm going to go ahead and hit the spacebar on the entire directory. And I'm going to hit C. It's going to ask me for a commit message. So clean up and 632. So this is for our podcast. So I've moved a whole bunch of stuff around and I've created the new show notes for our podcast this week. I'm going to enter and now all of the stuff has been committed. Now, if I wanted to push that, I would do capital P and it's going to ask me for my passphrase. And that is as simple as it gets. Now, as you can now see, there are no files there with changes. Everything is up to date. And if I were to quit LazyGit, we can actually see that I am completely even with the repository online and the repository on my computer other than that one stashed file. So LazyGit comes with a ton of key bindings. So if you want to find out what those key bindings are, just press the X key and it gives you a menu of all the things that you can do with key bindings. So things like commit changes, amend last commit, commit changes using the get editor, edit file, open file, refresh file, stash all changes, view stash, option, stage, understage, all things like that. And there are quite a few things here that you can do most of them having to do with just regular get commands and movement between the different portions of the interface of LazyGit. The biggest one that you should know is going to be tab tab is going to move you between each of these sections. And if you wanted to let's just say there, let's go to a different actually before we do this, let's go ahead and go to a different repository so that you can actually see some files here. So you use tab to move between the portions of the interface along this side. And if you wanted to move up and down in the main portion here of the changes, the diff, you would use page up and page down. Now, unfortunately, I do not have a page down key on my keyboard. So I can't actually do that. But you could remap that if you wanted to. Now a couple of things that we should talk about before we end. The first one is installation. Installation for LazyGit is almost amazing. Simply because it's everywhere. You can obviously build it from source, but it's also on Void, Arch, Fedora, Solis, Ubuntu, Fun2, FreeSBSD. I mean, you can just kind of see it's literally everywhere. And it was so easy to install on Fedora itself. It's just the matter of adding a copper repo and then installing it. So the fact that it's even on Solis kind of gives you an idea that it's pretty much everywhere. It was very easy to install. Now, when it comes to the configuration, you can find the configuration in the your .config file and you can do things like change the colors, change how the application refreshes and all that kind of stuff. You can also change the key bindings as well. So if you wanted to change the page up and page down key bindings, because those aren't what you wanted to use, you could do that from your configuration file very easily. So that's LazyGit. It is a very nice application if you are looking for a different way to interact with Git. And personally, I kind of like this way of doing it because I'm a lazy person and I don't want to have to type in Git push, Git pull, Git add, all that stuff all the time. Now, I understand that most people probably have aliases for that stuff, but I've never actually gotten around to doing that. So this is a better way of doing it. And I think that LazyGit is actually a better way of using Git if what you want to do is not only see the files that you have changed, but also what those changes are all at the same time, all right in front of you. That is a powerful tool for people who make a lot of changes to their files and kind of need to see exactly what has changed before you press a commit and upload it to the world. Now, one thing that I didn't show is how to change between branches. That's fairly easy. Once you're in the application here, if this were to have a different branch, you would tap down to that and then you could navigate between branches with the arrow keys, enter on the branch that you wanted to switch to or Git checkout. You could just do it that way. Now, I don't use branches all that often in my repositories simply because they're just for me anyways, and I'm not a developer. So most of mine are just the main branch. So I don't have one to show you that has something that could change to. But if you do use branches, which most people do, it's easy to switch between them just using the tab and then the up and down and the enter key. So that is the last thing that I probably should have shown you. So that is LazyGit. If you have thoughts on LazyGit, you can leave those in the comment section below. I'd love to hear from you. You can follow me on Twitter at the Linuxcast. You can follow me on Mastodon and Odyssey. Those links will be in the video description. You can support me on Patreon at patreon.com slash Linuxcast, just like all these fine people. Thanks to everybody who does support me on Patreon and YouTube. You guys are all absolutely amazing. You guys are just so amazing. I can't even begin to say how grateful and thankful I am for your support. So thanks for that. Thanks everybody for watching. I'll see you next time.