Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Git allows for multiple development tracks to be going on simultaneously, using a technique called branching. Branches could be used to separate work by multiple developers on a team, to isolate work on specific bugs, or to separate development code from stable/production code. Working with branches is not necessary to get started with an effective version control workflow, however; so for now, we’ll assume all work is on the default branch, called “master.” Where the word “master” appears in the Git commands to follow, you can substitute other branch names if you’re using other branches.[7]
When working with Git, you’ll primarily be working with a local copy, or clone, of your repository (which we’ll be calling Master) and pushing/pulling that copy to a remote copy, called Origin, usually hosted on a separate server. A repository, in version control terms, is a collection of all the files that Git is tracking for your particular project.
As you work, you add your changes to stage, a
temporary space that tracks the files, using the command git
add [filename,
foldername, or -A for all
files]. When you’re ready to finalize things, you
commit your changes to the branch using the command
git commit -m ".message goes
here"
Origin is your remote repository, where you push and pull all the working code for your project. This is generally a repository that is saved on GitHub or a similar Git-enabled hosting service.
[7] For more on branches, check out this great writeup on version control: http://hoth.entp.com/output/git_for_designers.html.