Up and Running with Git Transcripts
Chapter: Our first git repository
Lecture: Adding the jokes

Login or purchase this course to watch this video and the rest of the course contents.
0:00 You might feel a little bit cheated if we go over to our app and we
0:03 run it. Remember what do we get?
0:06 We get Hello World while fun.
0:09 I promised you jokes after all our project is called funny web.
0:12 So let me just grab a couple of developer silly jokes Wes bos has this thing
0:18 called dad jokes. We cover a bunch on the python bytes podcast,
0:20 but this is an easy way to grab some.
0:23 So let's just go over here and I'll just nab a couple and we'll put them
0:26 into some strings in our app.
0:30 So over here I'll just do jokes.
0:32 It's going to be relationship status.
0:36 I'll leave that in the database.
0:41 Let me put a few more in.
0:43 Here we go. I wrote some jokes in there as a list of strings and
0:46 let's go over here and and poor random and let's just go changes real quick to
0:52 tell a joke. And here the joke,
0:57 what it's gonna be. It's gonna be random.choice from our jokes.
1:03 And here we'll just put joke like that.
1:09 Pretty simple. Pretty simplistic really.
1:11 But let's go ahead and run it and just see if we can get a joke
1:14 There we go. Make a little bit bigger relationship status.
1:19 I'll leave the relations to the database.
1:22 What diet did the ghost developer go on? a boolean.
1:27 How do you get the code for the bank vault?
1:29 You check out their branch that's a relevant one.
1:32 So there you have it. Funny web has reached its true potential,
1:37 but we're not done. Are we?
1:39 Let's check this into source control this time.
1:40 We'll go back over to PyCharm and we'll do it here.
1:44 So I'll go I can either do commit or I could check it here let's go
1:48 over to the commit now again a little bit multi staged here.
1:53 If I just say added the jokes I did it commit there's no nothing to commit.
2:03 Remember we have to do a add even on just the changes for the track file
2:07 So that checkboxes git add desktop funny web/app.py and then
2:15 this this will do a git push to push those.
2:19 This will do a git commit to local and then if we want to do a
2:24 push I could have done it all in one shot and now it's gone.
2:26 I have to use this button,
2:29 push it like that says where do you want it to go?
2:31 A little bit of confirmation. Wait for a second down on the right you see
2:35 pushed one commit to origin/main and switching back over here we refresh Sure enough
2:46 29 seconds ago we added the jokes and if we go click right there it'll actually
2:50 show us the file changes. We added the jokes as a list so we imported
2:54 random we converted Hello world to tell a joke using the random library, lovely our app is complete.