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