• Pull: Get commits from a server • Push: Send commits to a server • Remotes ◦ A remote machine that has a copy of the repository and accepts your commits ◦ In a common centralized organization you usually have one, but it's possible to have many ◦ Example: main repo is BitBucket or Google Code, mirrored to GitHub
mkdir repos santos@bluenose$ cd repos santos@bluenose$ pwd /users/cs/santos/repos santos@bluenose$ git clone «repo» myRep --bare This creates a clone of that repository that works just as another repository: with all administrative data, but not useable for development, as the code is not really checked in - just the Git meta-data. Take note
"Hi there!" > README.mkd igor@local$ git commit "+ Adding readme" igor@local$ git push prod 2. Configure your server Name given to the remote server Complete repository URL No line break!
git checkout -f Opposite of git clone --bare: copies the entire repository code, without git data. By default does that with the master branch, but you can use other options here as well. GIT_WORK_TREE tells git where it would copy stuff.
options to do HTTP requests with code information after pushes, similar to post- receive hooks. This data can be used to trigger a deployment script in the server. There's also an online service called DeployHQ, where you can configure any repository (SVN/Git/Hg) and many deploy methods (FTP/SFTP/S3/Rackspace). It deploys new code using the chosen method.