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 trialNicole Patten
15,496 PointsConfused About Remote
I'm confused by what "remote" means.. is this the same as staging? If I have one branch-my local repo that I am working on, it is my understanding that I first commit those changes to the remote/staging site and then to the master. Is this correct? In that way there are 3 versions of the site... 1) local, 2) remote/staging, and 3) master/origin.
And when I "git add remote" I am basically syncing the local and remote repositories so that when I make a commit it goes to the correct place (the remote site). Are a branch and a local version nearly the same thing as well?
Please correct anything I've said here, I'm very confused.
1 Answer
Scott Montgomery
23,242 PointsRemote is just a shortened way of saying 'Where online your code is stored' IE https://github.com/username/repository.git
You can see what the remote for your code is by typing the command " git remote -v " into the command line.
Remote can contain your master/origin, gh-pages, and any other branches you may have.
So you have your local or working directory (locally on your computer where your files are stored) and you commit those files to your remote master or branch directories. There are two places where your files live - locally and remotely
Staging is just preparing files to commit; it allows you to create partial commits, modify a file and stage it again, and only commit or revert to the original.