Up and Running with Git Transcripts
Chapter: Tips and fixing mistakes
Lecture: Tip: Oh my zsh
0:00 Tip number two get a much improved terminal with. OhMyZSH or OhMyZshell. If you open up your terminal on Mac or Linux and it looks like
0:12 this. Just basic bash no enhancements, no extra features. That's not good.
0:20 That's not good. You could be so much more productive with your shell and especially
0:25 a lot of these features seem to center around git and things like that. Git in Python, virtual environments and whatnot.
0:34 So if you're on Mac or Linux and it comes out like this, you've got some room for easy improvement. Now, if you're a Windows person hang tight Z Shell,
0:44 which about we're going to talk about does not work on windows as far as I know, but I will show you something that does.
0:50 So let's talk about these two operating systems first and then we'll follow that up. You've seen that. That's not how my shell looks.
0:59 My shell looks like this. It's got all sorts of cool stuff here. If you do an Ls it'll tell you like how long did that command take to
1:08 run? It will tell you where you are. We can go over here, we get cool auto complete and whatnot. How do we do this? What is this magic?
1:18 If we go in here to like, let's say the HTMX stuff, we have even the git status right here.
1:28 What is this magic? This magic is actually multiple things in concept, but probably my favorite part of it has to do with OhMyZshell.
1:39 So this gives you a much better terminal experience than just the built in one. So you can install it. It's super easy,
1:47 you just come over here, run this either through w get or curl this shell command. It will install, it will ask you if you want to make it
1:55 your default shell, it'll look something like this is a pretty fuzzy image but you can see, it'll have like what this example is,
2:05 what version of ruby are you on? And are you gonna get repository and what branch are you in if you change it
2:11 around? So this is not everything you see on my screen, but there's a lot of cool features here.
2:16 So for example in this repository actually let's go to the one that we've been playing
2:22 with on the desktop notice you hit tab and you can auto complete of things here That's pretty cool. We can go over here and we can type things like
2:34 GI and hit tab. It will auto complete. Right, but watch this, this is where it might get more interesting. Well what can you do with git what commands?
2:45 Let's put this at the top. What commands do you have? Well, if I hit tab again, check that out.
2:50 These are all the features that we've been talking about. Git add, Git check out, Git branch,
2:56 getting merged, push pull and I can hit tab and arrow through here and let's just do get logged boom, that is a killer.
3:03 Right? So we can do auto complete in there but it goes even further. So let's do git check out tab that and if I hit tab again,
3:12 those are all of our branches specific to that repository. Right? You can see the alligator, the alligator, pr all those things,
3:19 Let's check out alligator. Pr Cool. And our prompt now says we're on the lizard. If I do touch abc.py look,
3:27 it even shows you all there's some edits of one thing in here. Oh good. So not everything you see on the screen is because of OhMy
3:37 Zshell, but a lot of these features like git check out also. I can do git see and hit up arrow and it'll just cycle me through all
3:47 the git space, see commands that I could have gotten. So you can get back to your history of things you've done with getting other stuff
3:54 Super, super easy. So tip number two install Oh MyZshell, if you're on Mac Os or Linux final thought,
4:04 do you see how that last prompt there was red but if I do an LS it's white, that means I canceled ctrl+c out of here or the last command
4:13 failed effectively. So even get sort of a success color. So good, so good. Don't let your shell look like this definitely want it
4:25 to look like the other one. It could be way more productive.