Git Fundamentals

Level up with "Git Fundamentals"

Access all lessons in this tutorial.

No spam, unsubscribe at any time.

This is a free tutorial

In exchange for your email address, you'll get full access to this and other free Epic Web Dev tutorials.

Why? First and foremost, your inbox allows us to directly communicate about the latest Epic Web Dev material. This includes free tutorials, tips, and periodic update about trends, tools, and happenings in Web Development that I'm excited about.

In addition to the piles of free Epic Web Dev content, you'll get the earliest access and best discounts to the paid courses when they launch.

There won't be any spam, and every email you get will have an unsubscribe link.

If this sounds like a fair trade, let's go!

Current section: Commands 17 exercises
lesson

Syncing Remote Commits to Local Repository

The git pull command syncs remote commits back down to the local repository.

In our case, everything is up to date, so let's add a file remotely to demonstrate the process.

Adding a File via the GitHub Interface

GitHub provides a web interface to add files to a repository. Let's use it to ad

Subscribe to unlock this lesson.

Transcript

00:00 Git pull is how we sync remote commits back down to our local repository. Right now everything is up to date so let's add a file remotely. Create file, name this git push.txt and give it the heading git push.

00:16 That's enough for our purposes so hit commit changes and change this to add push note. Finally commit. Now on our remote repository we have a commit that doesn't exist in our local repository. The commit that starts with da385e3. Let's run git pull again and see what happens.

00:35 Here we see the output for that command that resulted in adding this one file with the new commit. Now when we run git log locally we see that new commit and that head, main, and origin main are all in sync.

Full Stack Vol 1
You might also like

Full Stack Vol 1

Kent C. Dodds
Kent C. Dodds

A comprehensive guide to full stack development

166 Interactive Exercises ・ Progress Tracking ・ Completion Certificate
Learn more