Up and Running with Git Transcripts
Chapter: Teamwork: Merging
Lecture: Adding a feature: The Windows developer

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Here we are in our Windows environment. Remember this is developer two and developer two.
0:07 While we have been over working on the template side of things has been given another
0:12 job, how do you feel about putting the data directly inside of the main view and the app startup and all that.
0:22 We maybe should have a data layer that has things like the data about the jokes So in this world for this developer,
0:29 what we want to do is we want to move the joke's over. So we're going to add a new file here just called data layer data and we're
0:38 gonna just take jokes from over here, cut that and drop that into data. Oh and we do want to rename that to data.py
0:52 I don't know what I was thinking there. Alright, data.py has got its joke in there now of course we're gonna need to use these jokes as well.
1:00 So let's just say for now from data import jokes, let's go ahead and just run our code here and make sure things work fires up
1:12 No, we don't want to run that one. We want to run it like this, run our flask app, make sure it fires up. And does it click on it?
1:22 Sure enough, we still are getting jokes here, let's do that again. We're still getting our jokes but now they're coming from our
1:30 super fancy, super elaborate data layer which again is not that amazing but it's still nice to have a little organization right,
1:40 well our work is done. Let's check this in. We're gonna come over here to git and say we've got a couple of changes here
1:48 We've got our settings in our launch that we want to add those are going to be setting up Visual Studio Code and then this is our feature.
2:01 Now I could just put all four of these in here, but let's put a little bit more care into how we orchestrate these.
2:08 Let's put special like make these one commit and that another commit. So we'll say something like this and we'll check that one in there and then we
2:19 can add our changes that did the data layer. So finished new data layer. The factoring. Cool. We can check those in.
2:32 We're super happy with how this is gone now. We could bounce over to source tree but look, we can just press this button.
2:40 I will say we're going to push this. Are you sure you want to do that? Yeah, I'm pretty sure I want to do that. So it pushed those changes over.
2:49 Here's a nice friendly idea. I'm not sure if I want to choose it. We could periodically run git fetch is what Visual Studio Code is saying to us.
3:00 We've talked about pushing and we talked about pulling but other than that,
3:05 you're entirely unaware of how the state of the server is are there changes you theoretically
3:11 could apply and merge? I don't know because I haven't checked. So git fetch is like a pull to get me the changes,
3:18 but don't actually apply it. Just tell me what changes there would be if I were to want to apply them.
3:25 So this is what git Visual Studio and it's good extension is suggesting that it periodically
3:30 checks the server to just tell you there are changes if you want them. Sure, I'm down with that.
3:35 Let's give that a try. So if we go back over to our funny funny web here, you can see look we have our VS Code section and we have our
3:45 setup for Visual studio code and we've got our data layer re factoring here and let's especially pay attention to that file and look at its changes.
3:59 Actually let's click right here. So it just pulls up the changes. It says you changed Up here on line two and you changed online 6 - 10
4:09 But notice the part where the view method is, We didn't change that, that's important. Okay, so our changes are pushed up and our job is done.
4:21 I guess we're done for the day. Lets go home wimdows developer.


Talk Python's Mastodon Michael Kennedy's Mastodon