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 trialCameron Bourke
10,198 PointsGit Remote
I've been using Tower 2 to handle everything git on my mac. I understand the basics of branching, checking-out, stashing and all that jazz. The two things that is still a little furry is:
Do I merge my branches to my local master or the remote's master? And is the act of merging known as a push request.
-- and --
If I am working on a repo with a team, how can I ensure my local master is up to date with the remotes master on the GitHub?
Thanks in advance for the help guys!
1 Answer
Iain Simmons
Treehouse Moderator 32,305 PointsYou would merge your branch to wherever you want the code to go. If you're the only one using the remote repository, then it doesn't really make a difference, but if you were working with others, perhaps you only want to push changes to the remote repository/branch when you're completely finished with them.
I think you're thinking of pull requests. That is requesting that your changes be added to the main 'remote' repository, when you don't own/run it:
Pull requests let you tell others about changes you've pushed to a GitHub repository. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.
So, if you're working with a team, hopefully they've used pull requests, and then you can 'pull' from the remote repository when you want the most recent changes (best to do that before making any further changes to avoid conflicts later on).