Nightly build with git - best way to get sources before the build?

191 views Asked by At

I'm new to Git and a little bit confuse which command should I use in my case.
I'm running a daily build that start at the same time, during the build I don't change any source files but I do add a tag and push only the tag with "git push -f –tag".
Currently when build starts I'm deleting the working folder and run git clone to get the changes but it's probably not the right way.

Should I use the Pull command instead although no actual merge will be needed or maybe it's enough to use the checkout command ?

Also how can I get a snapshot of the branch as it is at a specific time ?
My problem is that although the build start at 20:00 there are pre build steps so the actual git clone command is running after 20:00 and might include commits done after the formal build hour.

0

There are 0 answers