I\'d like to script, preferably in rake, the following actions into a single command:
Greg's way should work (not me, other Greg :P). Regarding your comment, origin is a configuration variable that is set by Git when you clone the central repository to your local machine. Essentially, a Git repository remembers where it came from. You can, however, set these variables manually if you need to using git-config.
git config remote.origin.url
where url is the remote path to your central repository.
Here is an example batch file that should work (I haven't tested it).
@ECHO off
:: Retrieve the changes, but don't merge them.
git fetch
:: Look at the new changes
git diff ...origin
:: Ask if you want to merge the new changes into HEAD
set /p PULL=Do you wish to pull the changes? (Y/N)
IF /I %PULL%==Y git pull