Up and Running with Git Transcripts
Chapter: Teamwork: Open source and Pull Requests
Lecture: Making a change

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Our developer who was over on Windows who saw that Cool repository and forked it. They're about ready to get started.
0:08 Meanwhile the original owner of that project over here on the Mac mike. C Kennedy, they have no real notification or awareness.
0:17 So if I refresh, if I revisit this page as the owner I can now see, oh look someone has started and someone has forked it and you can actually
0:26 click on the little number there and see who has forked it. That's pretty cool. So great.
0:31 We know someone has forked it but that's not super important to us. So we don't know why they forked it.
0:36 Maybe just make a copy. Maybe they want to contribute. Who knows? So there's no real awareness back at this point to the original owner
0:43 So the Windows developer, the outside contributor wants to convert our lizard character that is in the rock paper scissors,
0:56 lizard, Spock game to an alligator. And they could just open up this project and start working on it.
1:02 But if you change the branch that you forked from and then the original project makes
1:08 some kind of change and you decide you don't want to keep yours too bad, you're out of sync. It's like all these weird merge conflicts.
1:14 So just like before we want to create some kind of feature branch for a pull
1:17 request. So we'll come over here and just say lizard to alligator like that.
1:23 Read that branch. We have our lizard to alligator branch and we're going to do our changes there as we saw just like the feature branch.
1:34 So our Windows developer likes to work in visual studio code. They're going to go open folder to the desktop. Open this up like the folder right now.
1:45 They're on the main branch. So let's go ahead and check out The local Lizard one. We haven't checked it out to this machine so we can do that.
1:54 Remote branch, pulls it down, creates it and we're ready to go. All we gotta do is come over here and decide well, how are we going to change this?
2:02 Luckily the original developer really factored as well. So everything about the players is just in this cool data structure.
2:09 So we come over here and control eight to do find and replace this alligator boom
2:15 All those changes. Let's make a quick change to the version as well just to indicate that. And we can just run this file since the entire app is
2:24 just the file. And look here's our alligator. And let's just let's just exercise that character. We created it. So let's play it alligator.
2:34 They played Spock. We took spock with the alligator. We knew the alligator was the right choice. All right, we'll try it again.
2:41 Yes, they tried that again. They tried the Spock. Thinking we might switch over to something like scissors,
2:47 but no. Oh, the computer took us that time though with the rocks smashed the poor alligator. Yes, we won. We won. So check this out.
2:59 We're in the branch, lizard. We got one change and so on by the way. Very cool to see that. So it looks like everything's great.
3:07 Let's go ahead and save this. Go to our repository here. And we just wanna put a message stage that one
3:13 change committed. Alright. Our changes are committed. If we look over in source tree on our machine, we've got are lizard to alligator right there.
3:30 Fantastic. So we've created our feature branch and we've made our proposed change to it
3:37 again so far over here. Still no notifications of anything happening.
3:44 It's just that we've maybe we got some people starring and forking stuff from our repository
3:48 but no notifications because remember we only changed our copy of the hosted repository in our account. Not Mike C Kennedy's original.


Talk Python's Mastodon Michael Kennedy's Mastodon