Up and Running with Git Transcripts
Chapter: Tips and fixing mistakes
Lecture: Tip: Sync your forks
0:00 First tip sync your forked repos we've already seen this, but let's just dive into a little bit more detail.
0:07 Okay, we're over here in my github profile and let's go over to my actual profile, not just my account here.
0:16 You can see all the public repositories and stuff that I have. You can scroll down, you'll even see sort of your,
0:23 your history and where you've committed stuff. This is generally publicly available. But let's go to the repositories.
0:28 Apparently I have 228 repositories personally and then we have a whole bunch over on the
0:32 talk Python organization as well. I guess we just get up a lot. So these are everything you can search for them. But let's go and find the forks.
0:41 So these are all the things that I've forked that I really care about. For example, the entire spectrum of
0:48 API's and services and web apps and all that for talk Python and talk Python training are powered by Mongo DB and beanie by the way.
0:58 So these two right here, I care a lot about them. Let's go and open them up. Beanie, we recently synchronized with beanie.
1:07 So we have no differences there. Mongo DB, there's always changes, right? This is a big company. There are tons of people working at,
1:14 there's 65,000 commits. So chances are at any given moment we are behind. So again, if I'm going to fork Mongo,
1:24 this is not because I want to contribute to it. You know, there many billion dollars company with tons of employees.
1:30 I'll let them can do the contributions, but I want to have this just as a safety net. You know, it's open source,
1:37 if something goes wrong with Mongo and they go insane Mongo DB, it would be nice to just, you know, have a copy of the database,
1:44 Database Server. So I cloned it but it's out of sync here, you can see 34 commits behind. So I'm just gonna go over here and say fetch upstream.
1:55 Now. My backup of Mongo DB, my local copy of the source code, it's here and again, it is in sync.
2:02 I'm not sure how long ago this was a week or two since I've last done this, but quick and easy.
2:07 Now we're all up to date and in sync you saw this when we did the
2:10 pr but it's generally useful just if the forked repository is moving ahead and you haven't done anything to synchronize with it.
2:18 So tip number one sync, your forked repos on github using this little fetch upstream feature that they added.