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

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Git for working with teams

I'm going to have to have a few goes with this video but that's fine. I just wanted to ask if this course is specifically for using git to work as part of a team.

I don't have a lot of experience with using Git for that. I work on my own for my business and my main use case for using git is for practice, for backup of my projects and a means for quickly moving my projects between different systems.

This means when I'm adding repos, I'm not copying from local repositories... I'm literally using the URL to push commits and pull them to my computer. Does this mean I'm using git all wrong? Should I be using Git as if I am working with a team?

What do you mean by "I'm literally using the URL to push commits". I've never heard of this before, so I have no idea if it's correct. I mostly use the command line, how are you pushing to a repo only using a url?

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

Perhaps I'm talking too simplistically.

What I mean is we're being taught that remotes can be added to local repositories as well as remote repositories on GitHub... hence the URLs I'm referring to.

Instead of GitHub repositories as remotes... we're being taught to use local repositories to clone and update local repos... I guess that's what I'm asking... am I missing something if I don't have a chance to work that way. :)

1 Answer

I think they are just showing how to add remote repos in general. I still think using Github as a master repo is still best practice. I saw the video as well and was confused. I can see people pulling in other repos to a local repo, but I would create a branch for doing so, then merge the branch. Not the most practical example in the video.

Jay McGavren
Jay McGavren
Treehouse Teacher

Jacob Mishkin true; we would never recommend pulling and pushing between local directories for actual work on a production system; most teams use GitHub for that. The goal with this video is to provide a safe, expendable setup where students can see the results of the pull on the histories of both the "local" and "remote" repositories.

We don't get into branches in Introduction to Git; for that I'd recommend checking out our Git Basics course.

Jay McGavren I totally agree, hence my first sentence "I think they are just showing how to add remote repos in general." I also understand creating a safe, local environment for teaching this is important. My response was to try and answer this question:

"Instead of GitHub repositories as remotes... we're being taught to use local repositories to clone and update local repos... I guess that's what I'm asking... am I missing something if I don't have a chance to work that way. :)"

I know you guys are not teaching to use local repositories to clone and update local repos. I should of added to continue in the series to find more real world examples of using Git.