Coding Blocks - Git from the Bottom Up – The Index

Episode Date: September 26, 2022

This episode, we learn more about Git's Index and compare it to other version control systems while Joe is throwing shade, Michael learns a new command, and Allen makes it gross....

Transcript
Discussion (0)
Starting point is 00:00:00 You're listening to Coding Box, episode 194. I don't know why I would celebrate 194. It's not like really a special number, but it gave me a chance to make that noise for some reason. And everybody loves that noise. It's like, that's their favorite, right? I think. It's one of mine.
Starting point is 00:00:18 And I'm definitely timely on that too. Like I, I nailed it. So subscribe to us on iTunes, Spotify, Stitcher, wherever you like to find your podcast apps. Uh, maybe that's audible.
Starting point is 00:00:29 I don't know. Just, it's probably not Google podcasts. Is that still a thing anymore? I think they've killed that this week. Um, yeah, wherever you'd like to find it,
Starting point is 00:00:37 we, we hope we're there. You know, it's funny. His outlaws a little bit sick and he's more chatty now than he usually is. So his voice is going to be gone by the end of this. Yeah, so you can visit us at codingblocks.net where you can find our show notes, examples, discussions, and more. You can send your feedback, questions, and rants to comments at codingblocks.net.
Starting point is 00:00:56 I like how Alan calls me out here. Hold on. Wait, wait, wait. Before you go, Jay-Z, Alan's calling me out. Listen to Alan, though, and tell me, does that sound like Alan? That's the sexy Alan voice. Is this the California Alan? No, I don't think this is the California.
Starting point is 00:01:11 But this is the one that my wife looks at me. She's all excited about it for a few days. And I'm like, babe, don't look at me. I really don't feel good. Okay, let's just move on with the recording. Joe, did you have something you wanted to share? Yeah, I mean, you guys have something you wanted to share? Yeah. I mean,
Starting point is 00:01:25 this is so you guys have both been so chatty. I just went over here reading about the number 194. Do you, it has a page in the wicket and Wikipedia. Like why do you love it? Is every number in Wikipedia? Cause every number is in, literally every number is in Wikipedia.
Starting point is 00:01:39 Yeah. There's someone that right there right now typing in the next number. Cause if I'm going to be doing it, you know, infinitely, but yeah, there's like four bullet points even about uh 194 and there's several references somehow i'll be doggone it is the smallest markov number that is neither a fibonacci number nor a pell number whatever that is yeah that's interesting and that's why i want it
Starting point is 00:02:00 wow yeah i mean every number that i'm typing in has a Wikipedia page. That's ridiculous. Maybe, maybe every number. I found one. Okay, phew. They're going to go through that madness. I'll go ahead and tell you that I, if you haven't already guessed it, I am Michael Outlaw. I'm Joe's. Oh, I didn't
Starting point is 00:02:19 finish my intro. We can move on. I'm Alan Underwood. We didn't say all the important stuff that joe has to say though no it's too late now we'll do it again later we'll never know whoa spoiler hold up now just hold off to the last 30 seconds we'll be good let me just get through these numbers and then i'll be with you that's right so outlaw you got you got some reviews for us what why are you putting me on the spot like that you know that i don't it's like right there in the notes i know that hurts guys that hurts everybody it was a review just for like you know some behind the scenes we've talked about this before i think but you know like we have a shared you know you
Starting point is 00:03:03 know rundown of of how we do each show. So we can each see like what we're going to discuss where and like even where somebody else is in that that rundown. So when. Alan decides to call me out on a blank spot of the rundown, he very well knows the answer. I'll have my contacts in and my glasses on. That's what it is. Is that what it is? Yeah, I mean, I can see the rest of the notes fine,
Starting point is 00:03:28 but these were a little bit blurry. Everything else was fine. That's why you didn't recognize that we passed through Joe's stuff without him saying it, right? Yeah, that's right. You're like, oh, whatever. Well, I guess we're all feeling very chatty tonight. It's going to be a long one, everybody.
Starting point is 00:03:41 Well, I appreciate you listening. Like I said, if you haven't already left us a review all right so um i guess i guess we'll start the show now um so we're back in get land and this time we're talking about the get index and if you want to follow along we'll have a link in the show notes for this exact chapter. And you want to mention this guy's name? Hello. Hello. Okay. I'm going to try it again,
Starting point is 00:04:12 but I do need to like double check his, the spelling, spelling of it. Cause there was an eye before the East. So I'm going to say it's John Vigley. Look at that. Oh my gosh. A hundred ninety four.
Starting point is 00:04:29 I learned how to pronounce a name. Yeah, that's amazing. After like five episodes, that's pretty killer. So this guy, we have, we have a link directly to this particular chapter that we're in and it's a pretty short one, but a pretty important one. And so this is meet the middleman, right? The get index. I do want to, I do want, Hey, real quick, real quick though. Uh, just as like a little bit of a backtrack meet the middleman, right? The get index. I do want to, I do want, Hey, real quick, real quick though. Uh, just as like a little bit of a backtrack to the previous episode, cause there was some good feedback on that episode related to, um, our, our discussion on like, well, why, you know, we were, we were like, okay, you can reorder the commits.
Starting point is 00:05:00 I'm not sure of an exact reason why you might want to, but Will was one of the people that pointed out that like, you might want to do that in the event that if you had, you know, a few commits and then later on you had commits that fixed certain other commits. So like, let's say you have ABC, right?
Starting point is 00:05:20 And so you've already moved to, to C is now the current and, and you have a commit that would specifically fix B. So in your commit history, it might be like in by normal, it would just be A, B, C, D. But maybe you want to reorder D to come right after B to fix B. And then it would be a B prime C in that point in what he was calling out. So, you know, and that's just, there might be other reasons that you have,
Starting point is 00:05:48 but, uh, I did want to, you know, um, you know, give credit where credit was due. We're like,
Starting point is 00:05:54 Hey, here's a, here's a, uh, a plausible reason why you might want to do that. Although if I am being fair, I'm still pretty lazy. I don't know that I would do it.
Starting point is 00:06:02 Yeah. Even in his comment though, he calls out the GitHub UI just makes it to where it's just like, no, just throw all the commits in. Just do it. Squash them at the end if you really care. Honestly, I'm
Starting point is 00:06:19 kind of getting more scared of Git the more I learn about it. I feel like I'm understanding less. I feel like this is working backwards. Yeah, I was going to say, I think this has had the inverse polarized effect on you. Yep, yep. I feel like I've only gotten stronger.
Starting point is 00:06:36 I can feel the matrix warping around me now. It's like, somebody comes at me with a Git problem. I'm like, oh, wait a minute. Hold on. Boom! Super flex. Yeah, it's just little things. I find myself second-guessing things I would do all the time. it comes at me with a git problem like oh wait a minute hold on super flex yeah it did you know it's just little things i found myself second guessing things i would do all the time and the other day i did a rebase i uh and it's interactive and i got a merge conflict before i could even get to my list of items i'm like it so it's like just like little things like that suddenly i'm like
Starting point is 00:07:00 wait i thought i thought i understood what this was doing now how on earth would i get a merge conflict on a rebase before i even try to commit the changes so just like we're just like that and even rearranging the commits uh that's all fine and well but now i know that each commit uh you know is ultimately ends up associated to uh blobs that represent the whole file so the thought of moving one commit before another kind of messes with my mind. Once I start thinking about them being changes to the same file, you know, so like that kind of stuff like scares me more than it used to,
Starting point is 00:07:33 which is probably good. Cause you know, I actually understand a little bit more about what's going on, but I'm still not quite fluent and comfortable, but you got rid of the Tildy 10, right? No, I still do that.
Starting point is 00:07:43 Why not? Oh, good God. Like that one seems fine to me. I like to see my commits. I tried doing from like, let me just rebase I to dev or main. But then it only shows you the changes in your local command, and you lose the context of where this change happened with other stuff.
Starting point is 00:08:03 So the history isn't mixed if you've done a pool. So I still like the till the 10. You know, uh, one thing that I just realized that I'd said was with that, uh, ABCD example. And then I ended it with like,
Starting point is 00:08:14 it would be a B prime C. That would imply that when you did the rebase later, you did a squash of B and D into B prime in order. So it wasn't just a reorder, I guess in that scenario, you reordered them in the file and then you pit, you selected squash as the function in what I described. Yeah.
Starting point is 00:08:36 It's deep. I'm definitely not having a Joe's thing there with it. Like I'm actually like, you know, enjoying this cause I do feel like I'm getting like, you know, a better, a better grasp'm actually like you know enjoying this because i do feel like i'm getting like you know a better a better grasp of things you know i i concur i i wouldn't say that i've gone off doing crazy stuff but i do at least now i can almost see what's happening right mentally i can draw i can draw a map of of what's happening at any given time and hopefully this particular section will further that so So let's jump in here.
Starting point is 00:09:06 So the index, when we're talking about the get index, it refers to the set of blobs and trees when running a get ad. This is also what is preferred to in even the get stuff as when you stage your files, right? So if you make a bunch of changes on your system and then you do a get ad and you add files, that's adding it to the index and you're staging those files ready to be committed. They're not committed yet. They're in this index. Um, and, and they call it out here. They say the trees and the blobs are not a part of the repository yet. Right. Well, it's not that they're there.'t bound to but like i think the wording should be careful there though right because the blob is in your local your local repository like in your local
Starting point is 00:09:54 git directory it's just that if you did nothing else it could age out and get cleaned up it's not linked up right yeah so your block it's not blobs in your Git metadata stuff, right? But it hasn't been stored to a commit that is now a part of your history. Yeah, you see in the objects directory, you'll see a file show up, but it doesn't have the commit, so it just literally has the file,
Starting point is 00:10:17 like assuming that's your, well, it's a change, so it's going to be a file there no matter what, whether it's a change or an add, it'll be a new edition showing up. Yep. Yeah. And I guess like also to that and two is that it would only be local in that part.
Starting point is 00:10:33 So like in a clone that Alan might have, he wouldn't see that blob yet because I haven't committed it and pushed it. And the server definitely wouldn't have it either because I haven't committed and pushed it. So that's why I want to be kind of like, you know, put like a little bit of an asterisk on that. Like it is in your local repo as a blob, but it, it's not, uh, they, in the, in the book, they refer to it as getting it. These will soon get bound into a tree for the purpose of committing.
Starting point is 00:11:04 So here's the important part to sort of drive that point home is if you were to unstage the changes using a reset at this point, again, nothing has been committed to your repository yet. So if you were to reset these files that are in your stage, you'd now have an orphaned blob because there's, there's nothing at all linking to it anymore right it just it's just hanging out there so assuming that you don't re-add it to the index and then commit it that thing will age out eventually because it has no linkage to anything at all inside git's repository yep and uh so just to kind of like walk through a simple example. You start with an empty directory. You create a file. You add
Starting point is 00:11:46 that file. Then it's going to show up as one single file that represents the blob. And it's not until you commit it that it also goes and creates a tree for that blob and then links a commit. So by the time you add one single file, you end up, once it's committed, with three files time you add one single file, you end up once it's
Starting point is 00:12:05 committed with three files in that object folder. Yeah. But I think Alan's point here though, is that, uh, in your, um, your index, it had a list of the, the blob IDs, if I recall, right. Uh, let me go back and look at an example, but I saw it. Um, yeah, so it, so yeah it knew like what was going to be like quote staged um and and so that it if you unstaged it then it was no longer in the index so literally nothing is pointing to it so that's where it would get garbage collected which is kind of the point that i was making a minute ago but if you if you just left it in your index, then at least something is still pointing to that blob, so it wouldn't. But, I mean, I don't know why you...
Starting point is 00:12:51 There's reasons why you would keep a blob around for 90 days because you, like, forgot about that repo, I guess. Right. And went on and did something else in it. Right. You didn't do anything in your working directory during that time. So the index is truly a staging area for
Starting point is 00:13:07 your next commit. That's really what it is. And basically what they say is, and it's kind of interesting. I mean, I've thought about this several times as I went throughout this, but kind of what's the point? And then they say, it allows you to build up your next commit in stages. And this is true. And you'll find that this happens a lot of times. So I'll give you an example. And it's not in the, in the text here. Let's say that you go in and you start on a get repo that somebody already has, right? Like I pulled down one of these two guys here and I pulled down one of the repos and I start doing some work. I can make changes to a file and then I can say,
Starting point is 00:13:45 get add that file. And it's now in the staged index, right? If I do a get diff on that file at that point, it won't come back and show me any differences because it's been staged for a change. If I go make another change to that file after I already added it to the index, it'll show up as modified now. And I can do a get, add that file back to get those changes back into the staged index. So it does, when they say that allows you to build it up in stages, it's because you can add that same file multiple times back to that index so
Starting point is 00:14:18 that it starts tracking those new changes that you did. Yeah, totally. Which is, I always thought it was funny. Like when I saw that in vs code the first time i noticed i had something added but then i saw changes below and it almost like seemed like an error but it makes sense when you think a little bit more about it yeah i will say though
Starting point is 00:14:33 it's how it does allow you to build up your stages your commits and stages and it lets you do all these nice things and kind of take your time on the range with how you should have it but it also forces you to do that so sometimes uh even like the first time i learned get instantly i was like why do we have to do this ad thing if i'm just going to commit almost every time that i want to do this i just do it at the same time like it's so it's kind of a weird thing so you know i like the feature and i'm glad it's there it does seem like an odd default to me yeah it's funny because that's that's exactly what I was saying at the beginning is like, I was kind of wondering like, well, why do I need that? But, but it is kind of nice, right? Like I have definitely found that there are times that it's like, you know what? I don't want to commit
Starting point is 00:15:16 this one right now. Let me unstage this one file and keep it hanging around. I'll commit the other things. And then right after I commit the other stuff, I might re-add it back to the stage and, and be ready for doing my next commit because it was too like discrete changes. Right. And I, and I wanted them to be separate. So now what's interesting is they talk about the fact that, um, this whole building things up in stages is something that is familiar to people that use Darks. I've heard of it, but I've never used it. I'd never heard of it. And Darks is D-A-R-C-S. You can go to darks.net and it's another
Starting point is 00:15:59 version control system that is all about this doing things in stages. So I was curious, I was off in the background, like, Hey, is there a way to your, your get diff thing? Made me question because I have, I found myself in the same situation where I've already staged a file and then I'm like, Oh man, I really wanted to see like, what was the difference in that? Did I want to go back? So like I I'm like, oh, but man, I really wanted to see like, what was the difference in that?
Starting point is 00:16:25 Did I want to go back? So like I'll get reset it and then do a get diff on it to see like, is I, did I really mean for all of these things and everything? And, and your call out just meaning, I mean, we think like, there's gotta be a way where I can't do that. Like, but, but, and now like we're armed with so much new information, like what might that be? Right.
Starting point is 00:16:44 It's a Git index thing. There's a couple ways. You could do a Git diff head, for example. And it would show you all your current files, which I guess in the example I have, I only have one. So I'd have to look up the exact syntax and call out the other file. But you could also do Git diff cached. So I'd have to look up like the exact syntax and call out the other, the other file.
Starting point is 00:17:10 But you could also do get diff cached or there's also a staged. So you get diff dash dash staged in either way in those cases, because I don't, I maybe because I only have the one file, it's a little bit easier. Now I'm curious to see like, what would be this, this way to call it out as a single file. And that's going to be my tip of the week.
Starting point is 00:17:25 I would imagine that get, get diff dash dash staged. And then the file path itself would probably do it. Right. That'd be enough. Yeah. It looks like it for staged. It works that way. And if I do cashed, it works that way.
Starting point is 00:17:41 But if I do head think, is that going to work the same? It did too. So in either way, if I just like added the file name after, so either get diff head and then the file name, or get diff dash dash staged in the file name, or get diff dash dash cached in the file name, either all three of those worked. I got the same output.
Starting point is 00:18:03 So it's just a curiosity. Excellent. All right. Well, we got up next. Let's see. So yeah, the darks thing, it was just interesting. They called it out. Um, I mean, I don't know that there's anything special to jump in there. Uh, just neat. Never heard of it though. Yeah, I hadn't either. Uh, that makes me feel better. Uh, so the, the next one that they talk about is you can almost ignore the index completely by doing a git commit dash a, which I think the outlaw has actually said this in the past, like never do that. And I tend to agree. Like git commit dash a basically just says, hey, take everything that you've got there, stage it, and then commit it at the same time. Right? Well, that's not why he says not to do it. He says not to do it because you should do git add capital A because that will add new files to the repository as well that you may have accidentally created in there without realizing it.
Starting point is 00:18:57 He just opened his mouth a little. Very thorough. This is the reason why you should never let other people speak for you no i mean i wouldn't do either that like you definitely can right you could be lazy about it and just do like a commit all you know or with the capital a for all either way like it's definitely a possibility and if you're working in like maybe, you know, uh, a small project in your evening hours, like this is your side hustle or whatever, you know, maybe you're willing to do that. But at least for me in like a, you get into like large team environments. I specifically don't like to do that because I like to see what I'm committing. Uh, and in fact, there's like, you know, we're going to get to it here
Starting point is 00:19:46 in a minute, but I'm pretty sure I've described this other thing coming up as a tip of the week in the past. In fact, I'll find that. But, um, I, I am very particular about, uh, just taking a minute to like review what I'm about to commit, like, or stage, is that what I wanted to stage? And if it is, then I'll commit it and push it. And then even after the fact, I go back and look at my pull request and, you know, just triple check only because like, what's that like thing, you know, like, you know, fool me once, shame on me kind of thing. Like, you know, you get burnt one time, you know, and to where like it matters in like your day life, you know, your day job. And you're like, you know what, I'm not going to get burnt like that again. Like I'm going to, I'm going to make sure like,
Starting point is 00:20:34 you know, I guarantee you the person who's listening that has deleted the production database is like, yeah, I hear you. Right. You know? And so, yeah. Yeah. So to be fair, this get commit a, again, it skips a step, right? Like it's basically saying, Hey, stage everything for me and committed at the same time, the way that the outlaw does it. And I'd assume I do it. And I also, or that I know that I do. And I assume that Jay-Z is I'll do a get add dash a, then I'll do a get status to look at it and see, Hey, did it add the files that I thought were going to be there? And then after that happens, then I'll do a get commit. So,
Starting point is 00:21:10 so my ad is my first thing. Then I check it just to make sure. And then I do the commit. So that's the safe way. I do not do the get out of a, well, you don't do the a yeah. You never use the a you'll, you'll add individual stuff. Um, I'll do the get ad. Yeah, I absolutely do the a yeah you never use the a um you'll you'll add individual stuff um i'll do the good yeah i absolutely do the a but uh but i also i absolutely use vs code 90 of the time now it's so easy uh yeah that's fair um so the next thing that they go on is they're talking about probably a source control system that a lot of us were familiar with before Git is Subversion. And I think that CVS was it? It was CVS, right? That was the name of it. Yeah, the drugstore version. Yeah. They also, I believe, did the same way is in Subversion, they would always compare the
Starting point is 00:22:02 changes on your file system in your working tree with the latest head. So there was no staging area, right? It was just, Hey, what changes have you made since the last, the last commit? And that's what it looked at. Whereas in get, it gives you this, this intermediate thing, the index to where it's always comparing the changes in your working tree to the index. So it's almost like it gives you this convenient undo place, right? More or less. And they even say it, right? This allows you to make additional changes before executing your commit.
Starting point is 00:22:37 Now, I did, man, I found this article that was really good. And I had to include it in here because they don't talk about it here. I got to ask you guys, have either of you ever done get ad dash dash patch? No. Boom. Of course you have. The one that I was talking about and it was my tip of the week in episode 22. Oh, that's going back a minute.
Starting point is 00:23:02 All right. Yeah. I had to look up how it worked. I've definitely never done it. I use this so much, and I love it. What about get add dash dash interactive? I'm curious. I want to go back and do this in a legit thing
Starting point is 00:23:19 because I'm curious to know what it does. I suppose in the background here I could put one together. I'm trying to understand the difference. If I had to guess, I would assume that interactive is just going to be like what it does. I mean, I suppose in the background here, I could, I could put one together. Um, cause I'm trying to understand the difference. I would, if I had to guess, I would assume that interactive is just going to be like, do you want this file? Yes. No. Do you want that fall? Yes. No. Whereas patch is going through the contents of the file. That's very close. The, the interactive works more on the entire, um, change set, whereas the patch is at your individual file thing. So to be completely honest,
Starting point is 00:23:49 I've never done either one of these because anytime I heard patch, it made me think of the old systems and I was like, I'm not doing a patch, I'm using Git. So I never went that route, but this was actually really cool. So I'll let Outlaw, he uses it a lot, so I'll let him talk about it.
Starting point is 00:24:04 So this goes back to the the days of where like for like the kernel development for example where patches would be emailed in and you know you wanted to you know just maybe take selectively review some things it's like kind of how i understand some of the history i could be wrong on some of that but you know i'm probably wrong on a lot of things. But at any rate, here's what I was referring to a minute ago, where like the reason why I like this is let's say I have a change set that I'm working on. And sometimes you might put in like some to-do comments like, Hey, you know, I'm still like piecing this thing together. You know, what did I, but you know, I want to take advantage of that, that index, right.
Starting point is 00:24:46 And how it's already going to like create blobs for me. So it's already kind of like saving history for me, you know, even though I haven't maybe committed anything yet. And so I will at various stages, like Joe will just blindly commit everything. We've learned this already. Like if every 15 minutes Joe's already been a hundred new commits. Yeah. It's all a hundred new commits. And then he goes upstairs, he makes a hundred more in 15 minutes and's already made 100 new commits. Yeah. All beautiful. It's all 100 new commits. And then he goes upstairs and he makes 100 more in 15 minutes and then comes back downstairs.
Starting point is 00:25:09 And that's fine. I just abused the index. So like I'll do a get diff of the file and be like, yep, I definitely do want that file. You know, and if I want all of it, hey, git add the file. But if I see like, oh, no, I didn't mean to commit that, or maybe that's a work in progress, or that's just some debug stuff or whatever, then that's where I'll use a git add-p. I usually abbreviate it to dash p, but you could do a git dash dash patch. And then the file name. And what git will do is it will interactively walk you through this session where it'll show you all the changes you've made to the
Starting point is 00:25:49 file. And it'd be like, do you want to stage this honk of code? Yes or no. And, and that's what it refers to them as, as in hunks of code, not chunks of code. But, um, and, and you can even like say, split that out and it'll, and it'll like take a guess and be like, hey, do you want to do this? And eventually you'll get to a point where you can't split it anymore. And sometimes when it does make that decision, it's still not like granular enough for you. You're like, oh man, it's like you're trying to combine these two lines that I didn't want. But yeah, so there's a whole bunch of different options that it, that it'll give to you. But the, the normal ones that I usually go with are like, yes, do it or no, don't do it or,
Starting point is 00:26:32 uh, split it out. But there's also like other options. Like you can say, Hey, except everything from this point forward. Right. Um, and then I don't remember the other ones off the top of my head, but, uh, that's how I use it. And then what you, what you end up with, oh, don't stage from here from the rest of the stage for here forward. And then there's a manually edit. So that one where you're talking about, it didn't split it down far enough.
Starting point is 00:26:55 Yes. You can manually edit it and go in and make whatever change you want. Right? Yeah. And the, and the key is that like, you're like outlaw, if you use this so much, why don't you remember it's because you don't have to, because like when you're going through the command line and you're doing this, like it'll literally bring this up in the, in the window and like, it'll give you your options at each individual stage.
Starting point is 00:27:15 What do you want to do? And it'll tell you your, your legend of different letters that you could type and what they mean. And at the end, what you get is let's say that you, there were some things that you decided were like work in progress that you weren't ready to stage yet, or maybe, cause maybe you want to ultimately commit the other portion and, and push it up and share that history. Because maybe like Alan and I are iterating on something and I'm like, Hey, I've, I've already fixed that bug that you're running into. Let me go ahead and push that change up for you. Right. And so I want to, I want to push that change up,
Starting point is 00:27:48 but I, I don't want to give him the rest of my stuff cause it's, it's work in progress and it'll create problems for him. So at the end, what happens is you get the pieces that you've said, yes, to, to stage, they get reflected in your index and the rest become unstaged changes, just like the unstaged changes that you were, you know, likely already familiar with, right? So now you see this file show up in two places. And if you do the git commit and not the dash a, and this is why getting out of the habit of using that is important, right? Then you're only staging the thing that you have. You're only, let me rephrase that. You're only committing the thing that you already staged, which are the changes that you have already like carefully reviewed and said, yep, that's the thing I meant
Starting point is 00:28:34 to do. And then when you push that up and Alan's like, so thankful for your fix because now he's not burdened with like all the other crap that you're still like work in progress on. Yep. So, so to take it a step further, what he was talking about with the get ad dash dash patch, and then a file that allows you to step through the, the individual changes in the file.
Starting point is 00:28:54 Right. And like he said, it's almost like this wizard that it takes you through. Like, Hey, here's the first change. Do you want it? Yes or no.
Starting point is 00:28:59 Do you want to manually edit it? Whatever. Awesome. Right. Get at interactive, let you do it on the entire repository. If you choose, or you can do it on a subset edit it, whatever. Awesome. Right. Get added interactive, let you do it on the entire repository. If you choose, or you can do it on a subset of files, whatever. But if you were to say, get add dash dash interaction, interactive, um, then it'll go through and say,
Starting point is 00:29:15 all right, this file, do you want to patch it, update, revert, um, add on tracked, quit, diff it, whatever. Like it gives you that option for each file and then you can choose to go into it. And let's say that you choose to do a patch on it. Then you'll go through that same thing with the get add patch. So this allows you to do it more on your entire change set of files
Starting point is 00:29:38 and then pick and choose what you want to do as you go. So again, I'd never even considered using this particular option or even the patch, but I might now, because I can totally think of files where I was like, you know what? I didn't really want all that debug code in there. Let me patch this and just strip out that debug. I do. It's so like, here's, here's, here's an example. There might be a file, like a configuration type of file, and maybe you have specifically changed the connection string for your purpose, your debug purposes or local purposes, whatever it is, but that's not something you want committed. Right. For example. And so like, you know, that might be a reason why you do. I use this. I use get out a lot. I super fan. Oh,
Starting point is 00:30:29 the patch of the dash dash patch option. Yeah. I think I'll be doing this here in the near future. And then, Oh, go ahead. Well, I was going to say,
Starting point is 00:30:38 since Joe is such a fan of visual studio code for these, I haven't tried it in visual studio code so maybe uh you know your mileage may vary maybe you could tell me i have seen how visual studio code uses the rebase interactive uh you know terminal terminal ui how it does that where where it's like, it gives you like a dropdown for, for the thing. So I'm not sure, like does, does the patch or am I the only one that uses the patch option for the ad?
Starting point is 00:31:13 So I've never done the patch, but I have seen that dropdown. Like if you do like get pull dash dash rebase and then interactive equals interactive, it does exactly what outlaw says. It'll pop it up in visual studio code and give you dropdowns like, Hey, what do you want to do with this?
Starting point is 00:31:28 Do you want to squash it? Do you want to, you know, I think we just heard a tip of the week there. You can do rebase equals interactive. I've only ever done rebase equals true. Hold on. Yeah.
Starting point is 00:31:39 There's an interactive. It's been so long since I've even like, we talked about this a couple episodes ago. Like, you know, you, you get into a habit of like, this is how i used to command and then you never go back to it yeah it's in there um i did it today yeah i've kind of experimented with patch a little bit mostly in uis but uh i don't know it's i like to have my stuff cleaned up before i commit it and
Starting point is 00:32:00 you know i am all your arguments are valid just not not my thing. Yeah, I usually do what you're saying, Jay-Z, is I will go back through and rip out my debug code, but how nice would it be to say, hey, do the patch, and then I can just go through it and make sure before it adds that I did clean it all up, right? It's almost like an interactive PR for your one
Starting point is 00:32:20 file change. Yeah, it just makes me nervous. You're committing something that you haven't tested, you know? Right. Oh, that's true too. But,
Starting point is 00:32:30 but if, Hey, here's the thing though, or Jay-Z. So you're saying that if you were to make changes in that patch, you're making changes to something that you maybe haven't compiled or whatever. That's fine.
Starting point is 00:32:42 Because right after you do it, you can run your compiler. And if it fails, you can just do a git commit dash dash amend. And you're good. You're right back to, it looks like it all happened at the same time anyway. Yeah. But in the examples that I gave though, like you, you didn't want that. You don't want that connection string permanently changed. Right. Right. But he's saying that you're now committing something that you haven't necessarily compiled. Right. And I agree with that. I do. So you can always go back. That's what I'm arguing, though. Like, depending on what
Starting point is 00:33:11 your change might be, that that might be true. That might not be true. That might not matter. Like, you know, if it's configured, it may not matter. But you're that's also assuming that you did it right. You didn't actually miss something. You didn't leave something out that you meant. Whoa, whoa, whoa, whoa, whoa. Hold on.
Starting point is 00:33:27 There's no shade at me. I got this right. I got this right. You would test after you commit even. Right, yeah, totally. You wouldn't have changes kind of outstanding. You're like, well, this one doesn't count. It doesn't affect anything, I'm sure. How many times
Starting point is 00:33:44 have you seen something that breaks in the person so that they didn't think that it mattered? No doubt. I mean, it's happened to other people, I'm sure. Not me. Right, not me. I'm still just giddy for like, oh, I can't. I'm armed with this new knowledge of GitPool Rebase SQLs Interactive, and I can't wait to try
Starting point is 00:34:00 it. Outlaw's not going to sleep tonight. So, alright, and then the one last thing that they threw out here that is interesting for anybody that's using emacs they actually have a plugin called get some and this was in in john wiggly's you know in that chapter there's this link to it so i'm guessing he's an emacs fan um but you said wiggly i said wiggly yeah it could be vaguely vaguely or wiggly as long as you say e and not i it's not waggly it's not vaguely it's vaguely or wiggly i'm so confused um so so if you use emacs and they have this nice little plug-in type thing for it that um allows you to
Starting point is 00:34:41 do these interactive things a little bit nicer so Did you look at it, by the way? No. Man, I haven't used Emacs, and I don't know. Yeah, so I was kind of curious about it. I was just like, oh, let me see what it looks like. It's actually really short. And then Emacs, I don't know what language is it. It looked like Lisp to me when I saw it.
Starting point is 00:34:58 But, yeah, it's just a single file. It's not, you know, let's see. It's a 200-byte file. Oh, you mean did I look at the actual repo yeah there's an actual plugin yeah just the 200 it was just pretty cool and half that file is like defining the flags and stuff this is just a nice little elegant program that isn't supposed to yeah it's it's very simple but no i didn't try it out in emacs is what i was getting oh yeah no no yeah the problem is is if you go and google get some it's not going to be helpful.
Starting point is 00:35:25 Yeah. So you're like, hey, maybe somebody has some screenshots of this thing. And it turns out like it's going to be hard to find. That's why I was late tonight. I was down an urban dictionary rabbit hole. Yeah. So G-I-T-S-U-M for those following along without the link. That's what I was talking about.
Starting point is 00:35:44 That's still not helpful. You need to know the specific GitHub URL to it. Yeah, you do. .io. Check out the resources. Now I'm going to Google it. Codingblocks.net slash episode 194. You can find everything you need. Or in your podcast player, you can just swipe over on there
Starting point is 00:36:01 and look at the notes, right? They're in there. All right. While you're there, you could hook us up with a review. We would really love that. We've got a website set up called codingblocks.net. We've got social links at the top of the page. And we have a URL set up at slash review.
Starting point is 00:36:19 So we go to codingblocks.net slash review. We put all these helpful links there to try and make it easy for you if you don't know where to go. We'll help you out with that uh if you do know where to go even better uh go ahead and drop that five star review and we would uh really love that and appreciate it that's how podcasts uh that's what makes them uh you know grow and feed and i don't know be loved i don't know what i'm talking about. I was so worried. I'm sure we're on the same page. We're on a high note. Let's end it there.
Starting point is 00:36:49 You did so good, Joe. I'm so proud of you. You've grown. Five star reviews. You've come a long way, and you've grown a lot, and it's showing. Outlaw took his glasses off. He removed his headphones.
Starting point is 00:37:01 He's like, oh, no. That is the beauty of iterative programming right there. Like Joe just, you know, grew a little bit. It took a while. We got there. We got there. We made enough commits that we got there. We did.
Starting point is 00:37:16 All right. Well, let's get into my favorite portion of the show. Survey says. Battery is fine, too. Oh, God. I thought I was done. I thought I was done. I thought I made it. Anyway.
Starting point is 00:37:30 Anyway. So, episode 194, Jay-Z, according to Tateco's trademark rules of engagement, you are up first. Okay. I got to know about these animals. Animals. Animals. Animals.
Starting point is 00:37:43 All right. Let's try this. Here you go. Question is, do cats and dogs... Either fight or hate each other. I'm going to go with fight. Do cats and dogs fight? You know what?
Starting point is 00:38:02 I haven't found out yet but I gotta tell you Alan it's gonna be hard to beat that one's gonna be hard to beat oh my it's not on the list no wow do cats and dogs
Starting point is 00:38:19 oh man I do cats and dogs wait you're cheating. I hear you typing. No, I'm clicking my... No, I was talking to Joe. I see him cheating. Oh, yeah, I'm cheating.
Starting point is 00:38:31 Yeah, he's cheating. Do cats and dogs... It's on my list. Cats and dogs... No, it's not. Can they survive outside? I don't know. Do cats and dogs... Can they they you're gonna like change the
Starting point is 00:38:46 question i think it'll work cats and dogs like each other there we go i'm gonna take the inverse like each other that is them yeah oh my i'm sorry joe. Alan just stole it with. Well, that's pretty close, right? Whatever it is. Actually, I realize now my mistake. What did you do? It caught on the each other part.
Starting point is 00:39:23 It's that it's it. It gave you credit for. do they understand each other because of each other what i do not have that on my list i'm going to hear your list because mine is definitely different okay well i'm going to click the button right now and we're going to see what is next now oh this is had i known these i would have have given Joe maybe credit or Alan credit. One of you would have definitely gotten credit for this since you did the inverse. Number one answer. Do dogs and cats get along?
Starting point is 00:39:55 Yes, that's my end. I win. That's number one. Number two, do they understand each other? Number three, I'm going to skip. That's a bit personal one well okay now that we
Starting point is 00:40:11 haven't skipped it way to unskip it there we go my number five is have belly buttons that number four is do they have a common ancestor six do they see color? What number am I on? Can I count to seven? No, I am on six. So I guess I meant to say number five was see color. So number six, go to heaven. Number seven, mate. My number eight is have belly buttons.
Starting point is 00:40:38 Do you have one that says, do they get COVID? No, but my number nine is, do cats and dogs dream which i can tell you mine definitely does oh yeah for sure and and uh do cats and dogs belong to the same species why or why not why would you even ask that question that'll make no sense so yeah i i have a couple different the get covid was interested um do they sweat? And then do they have the same fleas? That's an interesting one. I didn't know there were varieties of fleas. I'd imagine they're all the same.
Starting point is 00:41:13 But yeah. Yeah. I didn't know that either. Hey, Jay-Z, I won. My dog, well, so Alan has 10,000 points on the board right now. So you still got a chance to tie him. But like my dog, I don't know about yours, but like he definitely dreams. He'll, there'll be times where like, you'll just see his little paws.
Starting point is 00:41:36 He's just running, you know, and he'll, he'll like bark at something, you know, and you're like, Oh, I have a little dream. But you know, the sweating one too, though, too though like you know they go outside and run and play and then they come back inside and want to curl up with you and you're like whoa whoa whoa buddy sure yeah no you're a little moist their paws sweat but like their fur doesn't sweat you don't smell it oh yeah it smells like that's what i'm saying like they got some going on going on from the sweat. I didn't know that was sweat. I thought it was like, I don't know, vitamin E or something. It's a chemical reaction.
Starting point is 00:42:09 I don't know. That's interesting. Vitamin E? Yeah. Do we even have vitamins that go up that high in the alphabet? No. They stop at D. That's true.
Starting point is 00:42:20 No, this is not true. My Google's not your google apparently all right so uh joe this is your chance oh no alan this is your chance to stay on top of the board let's do the question of the day oh right question of the day yeah all right i feel like we already did this one didn't we already this the question of the day is movies about, I could have sworn we already did that one. Hmm. All right, let's do,
Starting point is 00:42:49 I'm feeling lucky then. All right. I'm feeling lucky then. Oh man, this one could get weird. Oh, I'm sure. How to hold in.
Starting point is 00:43:05 Ooh, Oh, I'm sure. How to hold in... Ooh, I know this one. A fart. Whoa! See? Alan! Alan! Can you say that on that one? This is a children's show!
Starting point is 00:43:19 Why, Alan? A toot. I don't know if you can say that. A toot. Oh, God. Am I right know if you can say that. A toot. Oh, God. Am I right? I think it's the original one. I think it's right.
Starting point is 00:43:30 Oh, my God. Do I win? Do I win? Joe? Wow. Things are not looking good for you, friend. Yeah. Because you got zero points on the last one, and now Alan just got another 6,000 points.
Starting point is 00:43:47 So Alan is at 16,000 points. That's right. I don't know why we didn't start at zero and Alan has 16 points. But, you know, this is like whose line is it anyway where the points are given out and they really don't matter. Right. You know, I'm too busy looking at how many vitamins there actually are. There's quite a few, by the way. But
Starting point is 00:44:07 I mean, I guess I can't believe you didn't trust me. It's either burp or hiccup is the only one that even has a slight chance. Burp is a really good one. Burp is a really good one. That's not what I was thinking of. Burp is
Starting point is 00:44:24 not there. I am going to check hiccup just out of curiosity it's the world is crazy not me hiccup is also not there let's see if my guess not right my guess was the number two what was it uh it well i said it was the number two answer, but it was actually the number one. Like, you know, you got to go number one. Dude, mine are way different. Yours don't count, Joe. Stop telling me about yours. Listen, you want to run a game show, you run a game show.
Starting point is 00:45:04 This is my favorite part of the show. This is it. Welcome to Jay-Z's favorite part of the show, because you know what jay-z doesn't have a favorite part of the show so we don't do that well what if you want to know how to uh hold in five guys fall guys whatever that is yeah or what if you want to hold in tears all i could say is uh well tears was the number eight answer on my list. Number, the number one answer was about holding in number two. The number two answer was about holding in number one. The number four answer was about holding in number two.
Starting point is 00:45:38 Number six answer was about hold. No, wait. Yeah. No. Number six answer was about holding in a different version of number two. The ninth answer was about how to hold in number two while you're in the car. And the tenth answer was about how to hold in number one. That was answer number two for a long time.
Starting point is 00:46:01 You know what? So while I threw it out there with with some pizzazz nobody could be bad at me for knowing what google was gonna say about this yeah like you know what i'm saying like that was that was totally legit but yours was related to number two it was it was It was the number one answer. This is amazing, isn't it? Yeah. I mean, yeah. The other ones were how to hold in a cough, how to hold in a sneeze, and we already said tears.
Starting point is 00:46:33 Ooh, sneeze. That's an aneurysm, right? Like you do that to me. You die. Yeah. Yeah. You have a stroke at some point. You pop a blood vessel in your brain and you die.
Starting point is 00:46:44 And it was like well hey it's better than him sneezing yeah a little insider information my wife is terrified that's how i'm gonna go because i stifle sneezes all the time and so i'll do it then i'll be like i'll just start shaking and she's like don't do that you look like you're off your medication or something like you're about to invent six minute abs. Yep. You got it. She does not like it,
Starting point is 00:47:09 man. You gotta do it all the time. Yeah. It's amazing. All right. So she hears this episode. Thanks for throwing me under the bus. No,
Starting point is 00:47:21 I'm not throwing her under the bus. She's seriously afraid. That's how I'm going to go. So that's pretty great all right well what if we were to take the index further i think we should let's do it uh the author mentioned a tool named quilt have you ever heard of quilt no dude i had to search all over the place to try to find anything that I thought was it. So, okay, at the time that I was reading the book, I was just reading it from my phone, and I wasn't in a place that I could do it. And I'm like, wait a minute, why is he capitalizing quilt?
Starting point is 00:48:00 Right. And plus, doesn't he mean quilting like why is he saying this like as a proper noun one you know not in verb tense like i'm so confused and with an exclamation mark on the end of it dude i googled all over the place for it couldn't find anything but the one thing that did come up is a quote command in linux and i think it's totally it you think so yeah if you look at it it's a tool for managing large sets of patches you can keep them in order you can apply them unapply them refresh a couple other things yeah that that's the only reason why i put it in here is because it sounds very much in line with what this next section is right
Starting point is 00:48:42 um this next section gets a little weird. Before we get there, can we agree on that? No, no, no. So I don't think so. All right. Okay, let's talk about the next section because talking about how it's weird and all, I would have totally agreed with it before I saw what he was trying to do and where he was going with it before I saw what he was trying to do and where he was
Starting point is 00:49:05 going with it. Well, this is, this is kind of what Jay-Z was just referring to about like, if you add things to the, to the index using patch, but not all of it. And then you're in commit and stage,
Starting point is 00:49:19 like you're kind of in way, in a way, uh, committing things that you haven't tested. And this is somewhat in that kind of vein of like, hey, let's test all the things. Except even further. Yeah, this is absolutely crazy. So first, let's say that they say that the primary difference between Git and Quilt is Git only allows one patch to be constructed at a time. When I read that statement in this, I was like, what does that even mean? Right.
Starting point is 00:49:49 And so they start going into the situation to where, um, let's say that you have four change sets, right? They call them ABC and D, and I'm going to keep this real easy without getting all crazy and confusing and everything. But let's say that they wanted to test out chain sets A and B together. And then they wanted to test out A and C together and A and D together. So to do that with Git would be very difficult, right? Like you'd have to, they even go into basically an example of what you'd have to do. you'd essentially have to have multiple branches.
Starting point is 00:50:26 You'd have to like get, check out some and, and sort of like maybe even stash commits and stuff, and then start checking out and cherry picking commits over so that you can do A and B together and see if they work. And then, all right, all right, get rid of B now and then try and bring C in and see if A and C work together. Okay, now that's done. Now, you know, get reset and do some other stuff. Like, it's very involved. So what they were saying you can do is you can use this tool called Stacked Git, which I'd never heard of.
Starting point is 00:51:02 Either of you? Nope. Okay. Nor had I i it's super cool so what it allows you to do is you basically can make commits as patches in a queue so you can basically now instead of having to check out branches and do resets and cherry picks and all this other kind of stuff, you can basically just interactively select the patch. And it's more or less just doing pops and pushes onto queues to get your different patches together that you want to test together. So it's very easy to test out changes A and B together and then tossing away B and saying, all right, give me A and C together. So it's very easy to test out changes a and B together and then tossing away B and saying, all right, give me a and C together. And the it's very elegant. Now what's crazy about it is
Starting point is 00:51:51 if you're used to the get way of doing things where you have an index and you stage things and all that, this is totally foreign, right? This is, you have a bunch of patches and commits out there sort of, or patches out there that are sort of able to be in play, but not actually done until you're ready to do it in any kind of sort of order you want. So it's almost like this three-dimensional way of thinking about your patches that you can apply in any order you want. I couldn't think of a bunch of reasons I would ever use it. I don't know about you guys, but it's really interesting. Yeah, that's pretty much exactly what I thought. I was like, oh, this is really cool.
Starting point is 00:52:33 I can understand why this is a good workflow, but it's just not something I do nearly enough to warrant learning a new tool and adding it into the tool belt. It's cool cool though. So my mind immediately, like as I was reading through this, like also to, I was kind of thinking like this might be more, go back to that email example where like patches are being emailed to you and
Starting point is 00:52:59 you're like, okay, like Alan emailed me some patches that he, he doesn't know that Joe also emailed me and I need to make sure that their changes work with my changes as well. And so maybe I want to test, like, I already know that I've already tested mine. Um, cause I had that luxury of testing mine on my own time, but now I want to see like, does mine and Alan's work? Yes. Mine and Alan's works. Does mine and Jay-Z's work? Yes. They work. Okay. Do all three of them work? No. Okay. Is the problem Alan and Jay-Z's conflict? So maybe I just want to test theirs.
Starting point is 00:53:34 So that's kind of the use case where I was thinking, and like, especially if you're in a situation where like, you know, you don't have access to the repo, uh, you know, kind of, kind of thing. Um, that, and that's why you would like email your patch in, right. Or at least about, you know, the way it used to be. The, the thing though here is I was like, wow, this is super neat. And I'm not, I'm definitely not trying to take away from it. I was also in the back of my mind, like, wait a minute, you're telling me that I can't do that in any other way? I call shenanigans. And so here's the closest way that I was thinking of that would be like, uh, pretty like just normal, get, get tool use, you know, uh, uh, tool chain stuff, right? You're not installing anything extra, but it ignore the, the get patch, you know,
Starting point is 00:54:25 being emailed to you, for example. And instead, like if you had say three or four sets of changes that you wanted to test these, these combinations of, in my mind, I was like, you know, you could like have each change stash it, then, then like stashed change a all right and then that resets your index now bring in stash or change b stash that as another stashed thing then do the same for c and another for d and then i could decide to um not pop it from the stash. What is it? Not apply or something? I had to go back and look at the command.
Starting point is 00:55:11 Get stash apply just uses it. I think that's the one. Can you get the one that's two or three levels up off the bottom of the queue? All you're doing is when you get stash let's when you get stash, let's see,
Starting point is 00:55:28 get stash, which one was it? Oh, yeah. When you get stash apply, you can pick the stash that you want. And if I recall, it's been a while since I tried this, it gives it some weird numbers that you could do. So you could pick what number you wanted from that. And it doesn't have to be an order. So you could say get stash apply, you know, stash one and get stash apply stash two, or I'm sorry, three,
Starting point is 00:55:57 let's say so that you skip number two. And then that way you could do that. And then you could just do like, okay, I'm fine with that. I haven't popped them from the stash, which is your cue that you made the analogy of a moment ago. So I haven't stashed it, but you know what, let me get reset it now. And I will get stash, apply one, get stash, apply two, right. You know, assuming that stashes were named one and two. Um, so, I mean, I think that's a way that you could get to that. Now, is it as elegant as this? Maybe, you know, um, I, I would say maybe not. Cause like this did have it make it super easy to like get, uh, to, to delete that one single change set that you wanted to get rid of.
Starting point is 00:56:50 So what you just mentioned is pretty clever. I mean, it's sort of a nice way to do it. The only thing that looks like may not work there is if you were to do a get stash apply, you have to tell it the index. Like if you're trying to grab something that was a few down or whatever, it says that it the index. Like if you're trying to grab something that was a few down or whatever, it says that it can fail. So if you have conflicts, the get-stash-apply will just be like, no, you can't do it, right?
Starting point is 00:57:13 So you won't have a chance to even try and mitigate it. You were already going to have that problem then. In either of these scenarios, you would have that problem. Like even with the uh the stacked uh stacked git right like if your change conflicts with joe's change it's it's a conflict period that has but they may give you they may give you a way to resolve it i think with the apply you can't like it'll just fail you have no option to try and resolve that conflict. I don't think that's... I think it goes into your normal conflict resolution thing.
Starting point is 00:57:50 It's been a while since I've done a stage pop or apply or stash. I'm sorry, a stat. I'm using SVN terminology. No, SVN, it was shelf. Sorry. But it's been a long time since I've done a stash, apply, or pop that did result in a
Starting point is 00:58:06 conflict. Cause normally when I do it, like I, I, I'm just because of the habit of my workflow, like I'm typically doing it because it is a very, uh, like known set of things. Like, so I know I'm not going to run into a problem with it, but, um, so it's just been a while and plus it's not like longterm. So's not long-term, so I'm doing it for short-term purposes. But if I remember right, though, you do get into your normal, like, hey, there's a conflict here, and you get to resolve it. It's interesting.
Starting point is 00:58:36 Yeah, I couldn't tell you. I haven't done it in a while. So it looks like per the documentation it wouldn't, but I mean— I don't know. Yeah, but you are right. That's on the pop, though. Yeah. Well, no, on the apply. Anything with dash dash index, it looks like per the documentation it wouldn't, but I mean, I don't know. Yeah, but you're right. That's on the pop though. Yeah. Well, no, on the apply anything with dash dash index,
Starting point is 00:58:49 it looks like it could be a problem. Well, it says on specific to the, to the pop documentation, it was, uh, however, this can fail when there, when you have conflicts which are stored in the index where you can therefore no longer apply the changes as they were originally. So maybe I am wrong. It's been a while. Yeah.
Starting point is 00:59:09 It makes it sound like you can't, it makes it sound like it just dies, but we're going to find out. So while he's doing that in the background, that that's kind of it for this one. Um, you know, this is going through the index.
Starting point is 00:59:20 Like we said, the get stack or the stack get thing is interesting. I can't think of a reason I would particularly use it. But if you're somebody that manages a repository for a team and you're taking in changes to put into it, maybe that does make sense there. I will say, so just based on kind of everything, including this chapter, which I thought was interesting, I absolutely rebase a lot more. Like so much that I have gotten better with them because like there's little things like okay i need to figure out for real one final time how to change a word because just like changing the word uh pick to like a you know s or an f for a
Starting point is 00:59:57 squash or whatever the other one is um i'm so tired of like delete because i do it in vim you know so it's like hitting the the button to insert or add delete delete you know however there's several different ways to do it but now i just cw f done replace the whole word with f it's wonderful look at that i am completely wrong it doesn't take you into the normal conflict resolution it just says the problem here is that because you haven't committed it so it says your local changes would be overwritten by the merge please commit your changes or stash them before and so that's why yeah learn something new every day all right so in this uh in this particular episode we talked a lot about the index and some tools around it that are interesting.
Starting point is 01:00:46 And we will have links to all of this stuff in the show notes and the resources we like and all that. Just go to ian.wikipedia.org slash 194. That's it. Yeah. So with that, it is now time for my favorite portion of the show. This is the tip of the week. All right. So have y'all heard of stable diffusion?
Starting point is 01:01:13 No. Okay. Have you heard of Dolly? Like the thing that kids play with? No. Okay. So the third question, have you been seeing those weird ai generated images that people
Starting point is 01:01:26 have been posting oh yes dolly okay i thought you were saying like dolly like d-a-l-l-e i think that's how you pronounce it dolly okay yeah i know okay yeah people are going crazy with it it's like it's uh it's been surprising to me so i keep seeing like these really weird and really cool images that have been generated with it. I mean, just amazing. I also can see a lot about community saying and talking about like whether what's going to do to artists and what this is going to do to game industry and, you know, all that stuff, which, you know, we'll see. Time will tell. But it's something that it's, you know, I don't know enough about the actual algorithm or, you know, what it it is but it's basically kind of exploded it's like this new uh at least uh newly exploited area of like machine learning that's just like absolutely taken off in the last like month or two it's you know some something that's rising
Starting point is 01:02:15 really fast and people are you know getting stuff out there and it's like a real hotbed of kind of just innovation right now and you can set up uh get started just on your laptop with open source tools and python and get going and people put out blogs uh telling you how to get stuff set up and install the packages and whatnot but if you're on and i will have a link to that that's part of my tip so if you want to get started with this you can do that but if you're on an m1 mac then someone has actually put together a little gui interface for kind of entering your queries and generating images. And you can install it via just a DMG file. So if you've got a recent version of Mac OS, you can basically get a one-click installer to do this.
Starting point is 01:02:56 And then some of the pictures, if you click through this link, it's called diffusion B. b the person uh like what they wrote here is photo of a xenomorph like alien from the aliens dragon in game of thrones hybrid high detail photorealistic trending on art station ray traced and you know the magic computer a little person in the box uh drew a xenomorph dragon from game of thrones uh that looks really cool. You can just use that to generate whatever kind of images you want. It's a really interesting space and technology and stuff. It's just kind of something cool to play around with
Starting point is 01:03:34 and be part of the zeitgeist for a minute. Hold on. Let's see. Joe Zack playing basketball with cats. Yep. Is he gay? Awesome.
Starting point is 01:03:49 As a children's book illustration. I bet that would look really cool, actually. It probably would. It's not going to know who the heck I am, but it'd be interesting to see what it comes up with. Nailed it. Yeah. Like Zack Morris and Joe Rogan mixed together. No.
Starting point is 01:04:05 I'm trying to find where... Yeah. Like Zach Morris and Joe Rogan like mixed together. No, the, the, I'm trying to find like where, cause so I think part like to add to why this project has like gotten in popular is, has been mentioned on some popular TV shows here in the past, you know, let's say four to six weeks, something like that.
Starting point is 01:04:21 Right. And I'm trying to find like where you can actually like do your own custom searches. Cause everything I'm seeing is like, you'd have to sign up or install an app locally. That's the thing. I don't, I don't know of a single one that lets you do it without either some sort of
Starting point is 01:04:35 beta program or a paywall. Like this is like still surprisingly new for how much attention it's getting. And I think it's actually pretty computationally expensive just to even generate a single image. Like It's not something you would do a thousand of really quickly. Not something you'd exactly want to be paying for for free to let people do this. How do I do this? I gotta know now. While they're looking at that, I'm going to give you my
Starting point is 01:05:03 borrowed slash stolen tip of the week, which I got from, I think it's Micro G. It looks like the first person who mentioned it. There is a tool that you can get on Mac and Windows, and it's called Get Tower, and it's get-tower.com. And apparently people just love the visual features of this for Git, for navigating and doing things in your repository. So the only downside to it, and I mean, we don't get any money for this or anything, is for individuals, it looks like it's $69 a year. For professionals or small teams, it looks like it's $99 a year. But I mean, there were several people that were talking about it in Slack
Starting point is 01:05:53 and they all seemed to like it. Another tool that was mentioned, and I'll put a link in there as well, is GetKraken. That's one that other people were mentioning. I think somebody, one of the folks said that they started getting some spam, which is unfortunate. But if you are somebody that likes GUI tools for this kind of stuff, those are two options out there. Can I
Starting point is 01:06:19 throw in mine as well with that? Is that possible? There's also the Git command line. Nicely done, sir. Nicely done. You're welcome. I will say, maybe I'm not the only one that was a little disappointed here. Because when you said Git Tower, my brain immediately went to a tower defense game that had something to do with
Starting point is 01:06:45 get. And I'm like, Oh my, that's going to be amazing. That's a thing. Like, what do I do? Do I have to like solve some kid problem in order to like,
Starting point is 01:06:53 you know, beat the next wave or whatever, or like, you know, to upgrade my tower or something. Tell me that wouldn't have been like a better version. I'm sure. I'm sure there's something out there that somebody has done like this. I mean, I'm telling
Starting point is 01:07:06 you, like, it's, what, this is this is, you know, end of September time frame, so you know, we'll be talking about the next Coding Blocks game jam here pretty soon. Game, jam, jam, jam, jam, jamuary pretty soon, you know? And so, you know,
Starting point is 01:07:22 there's your game idea right there. A Git tower defense. Yeah, Git tower. And so, you know, there's your game idea right there. A Git tower defense. Yeah, a Git tower. That'd be pretty cool, yeah. You got to shoot down all the Git commands. That will take a while. That's the truth.
Starting point is 01:07:36 I don't know. We don't have to be so negative. It'd be good. It'd be fine. All right, whatever. What did the fish say when it swam into a wall don't that's it give me like 10
Starting point is 01:07:58 10 minutes 10 minutes huh I didn't see you there damn was that really it oh i get it oh man hey wait i got one i got one for you this is this is like this was good man who run in front of car get tired oh man who run behind car get exhausted nice okay that's really good right
Starting point is 01:08:35 i like how you say it in like these philosophical kind of ways you know yeah this is this is definitely a confucius say type thing, right? That's how you have to do that one. Uh, well, I mean, while I'm on my watery jokes,
Starting point is 01:08:49 did you hear about the submarine industry? It's sinking. It really took a dive. There we go. That was close. Who didn't? Right. Um,
Starting point is 01:09:02 okay. So, uh, for my tip of the week, I i've definitely talked about this as a past tip uh generically but my reason 532 to love the github uh cli the github cli not get cli because i mean obviously you're already using the Git CLI. Don't get crazy. Oh, I mean, you know, you're using Git Tower or Kraken or whatever.
Starting point is 01:09:29 But for those of us that do like the CLI, the GitHub CLI can easily automate your tasks for, like, creating PRs and things like that. And I think, like, I previously talked about this in regards to creating a PR. Like, if you do a create GitHub, I'm sorry, GH PR create, then, you know, part of the beauty of that too, is it'll also ask you like, Hey, do you want to push this up, you know, to the remote? So it'll take care of that for you. So there's like one less thing to do. But I recently was like, I wonder what the options are on create because I wanted to create a draft PR, which you can do with GitHub.
Starting point is 01:10:10 And so I was like, I wonder like what all the options are. And sure enough, there is a dash dash draft option that you could apply. So you could do a GHPR create dash dash draft and it'll push it up for you as a draft pr so yeah it's pretty cool just one more reason to like the github command line yeah it's it's better than it ought to be it's crazy i'm always impressed with it yeah well you know why just being like i you know i'm so used to cli tools you know being uh full of documentation reading and scripting and forgetting about it and being painful. But the GitHub, I could not touch it for like two years
Starting point is 01:10:48 and be like, let me see if I can. Oh, yeah, that worked. I just created an issue or whatever it is. It's just great. It's really consistent. It's a nice API. Yeah, I'm a big fan. So we'll have a link to that,
Starting point is 01:11:01 specifically to the PR create link in there since I've already talked generically about the GitHub command line before. But other than that, if you haven't already subscribed to us, you can find us on iTunes or Spotify, Stitcher, like all the major platforms. And, you know, like Joe said, he was doing so good there for a while. You know, definitely leave us a review. You can find some helpful links at www.codingblocks.net slash review hey and while you're up there at www.codingblocks.net make sure you check out our show notes examples discussions and more and send your feedback questions and rant to codingblocks.net slash slack okay and hey um while you're there doing that
Starting point is 01:11:42 thing uh you should make sure to follow us on Twitter, at CodingBlocks, or you can go to CodingBlocks.net where you can find all the social links and stable diffusion renderings at the top of the page.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.