Let's say I have a script-driven build process, working on two readily checked-out work directories (one for continuous builds, one for nightly ones).
With Subversion, I would run svn update
for continuous builds, and then build only if that update obtained any changes. For the nightly builds, I would run svn update -r{01:00:00 UTC}
and build in any case.
This works fine with svn:externals
and even with local modifications, as long as they don't conflict with the updates from the repository.
Now I would like to add Git support to the script, getting the updates from the master branch of the master repo, and am looking for the Git command for "doing the right thing".
I have seen git pull --rebase origin/master
.
Due to my extremely limited practical experience with Git (a couple of hours, all told, half a year ago) I have no idea if that would float my boat, or wait until I become complacent only to sink my boat then, due to something in the Git workflow that I am unaware of...
Wanting to get all changes from the origin repo without dumping local modifications, once for the current state of affairs, one for the state as-of a given timestamp, what would be the correct Git commands?