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