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 Introduction to Git GitHub and Other Remote Repositories Adding Remotes

push or pull

so i think im correct but basically with an actual repo on github this would be a push not a pull?

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hi Jake,

The difference between push and pull in the context of your repository is if you are behind on the contents of what is in your GitHub repository.

You can check on this often by using the git status command.

This will return a message indicating if you're up to date with your repository, whether you have files you need to commit, and how many commits you are ahead or behind by.

  • If you are ahead of the repository that means you have commits to send to your repository with git push.
  • If you are behind, that means you need to update your local repository with git pull. Take care with this command though.

Make sure you have no stray files on the working tree that you haven't yet committed. I've been caught out by this too many times when my local repo diverges with what is on my remote repo. Such a headache. :)

I hope I've answered your question there!

"so i think im correct but basically with an actual repo on github this would be a push not a pull?"

Standing by itself, this statement does not provide enough context to provide an answer. It isn't really a question. Having said that, I agree with what Jonathan says.