Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools Git Branches and Merging Remote Branches Remote Branches

remote branch / remote repo

Hi,

This video got quite confusing:

At 6:11

remote branch is out of sync with the actual remote repo

I understand a remote repo, but what is a remote branch? Was this commit done in a branch in the remote remote, and therefore master/origin (which is the same as master/remote didn't detect the commit?

Thank you

1 Answer

Jay McGavren
STAFF
Jay McGavren
Treehouse Teacher

When you do a git fetch, every commit that exists in the remote repo gets pulled over to your local repo (except for the commits you already have). The commits themselves are not connected together in any way, except that each commit points to a parent commit. But the commits themselves have no concept of what branch they're on.

However a git fetch also pulls over all the branches from the remote repo. However, an ordinary branch on the remote repo becomes a remote branch in your local repo. So the origin repo's fix-issue-42 branch becomes origin/fix-issue-42 in your local repo - a remote branch.

Ah, I see. It's beginning to make sense. Thanks Jay!