Python for Entrepreneurs Transcripts
Chapter: Digging Further into Git
Lecture: Git push

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Now that we have the "git remote" command in our tool belt,
0:02 we can use the "git push" command to transfer
0:05 our new commits to another repository,
0:07 let's push the change that we made in this chapter
0:09 on the course demos repository up to GitHub.
0:14 We got our change committed,
0:16 and we can see that we have remote repository, with the name of origin,
0:19 let's push our new commit up so this repository is synced
0:23 with what we have on GitHub, you can use the "git push" command so "git push"
0:27 and then we're going to specify the name of that remote repository,
0:30 and there is one more thing, we need to specify the branch,
0:33 and we've been working in the master branch so far,
0:36 before I kick this off, I want to just escape out of that command,
0:39 not push up yet, and show "git branch", we're working on master.
0:44 "git branch" shows up which branch we're currently in,
0:48 but how do we get into master? Well, the first time you run "git init",
0:52 it's going to create the master branch for you,
0:54 that is where all of your changes are being made,
0:56 unless you explicitly specify that you want to work in a different branch,
1:00 if you're making small changes to your project,
1:03 then you may never need to use other branches, you can just stick to master.
1:07 Let's get back to pushing up our code.
1:09 Again, "git push origin master", now, GitHub is going to challenge us
1:12 for our username and password, in my case it's mattmakai,
1:16 I'll paste in my password, and now we can see we pushed up to GitHub.
1:23 We push from our master branch, into the master branch of the private repository.
1:28 Now when Michael is working on this project,
1:31 he can pull down these changes and he can see the new file that we added,
1:34 "git push" is only one way that we can push our changes up,
1:38 we can also use a pull request via GitHub which can often be much easier
1:42 for code review purposes and when you're working with the bunch of other people,
1:46 "git push" is great when you're working on a repository by yourself,
1:49 or with just one other person, pull request tend to scale to a much larger teams,
1:54 and we'll take a look at those a little bit later in the course.
1:56 For now, you should be able to use the "git remote" and "git push" commands
2:01 in order to sync your changes up from your local repository into GitHub.
2:05 That provides you one way you can work with other people,
2:08 and it also backs up your repository just in case anything happens
2:11 to your local system, and you need to pull down everything from GitHub.