0

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.

Epligam
  • 741
  • 2
  • 14
  • 36
  • The delete and clone method is clean, and it allows you to modify your build infra easily, so I would stick with that. For the time tracking, I would tag the repo at that time, and checkout that tag in the build. Does that help? – g_bor Oct 04 '20 at 15:09
  • Thanks for your answer, How can I tag a repo at a specific time ? Is there a way to add annotated tag a repo (GitBucket) from command line ? – Epligam Nov 04 '20 at 15:05
  • You can useg git tag -a for that. – g_bor Nov 06 '20 at 09:36

0 Answers0