Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Git Basics Working With Remote Repositories Pushing and Pulling

Not understanding the difference between pushing and pulling...

Can somebody point out where in the video does it say the difference? Better yet, can somebody just explain to me? I'm clueless... Thanks! Any help appreciated :grin:

~Alex

1 Answer

Kevin Korte
Kevin Korte
28,149 Points

Just imagine the remote repo is in the cloud, cause it kinda is. And in the remote repo, we store the master version, and all other versions of our code (in seperate branches) in this repo.

When you work on something on your local computer, and you want to make it available to everyone else on the project, you commit the code to your local repo, and then you "push" your code up to the remote repo.

The opposite is true, when you want to update your local repo with the code others have worked on, you "pull" the code down from the remote repo, to your machine, where you can start your work to later "push" back up to the repo.

Thanks for explaining! :-)