I have an AngularJS project with a bare Git repository on a private server, and I will introduce automated unit testing really soon. I want to install Jenkins on the same server, so I'm asking myself whether it's a good idea to use a non-bare repository so Jenkins could run the tests directly from there, or if I should make Jenkins to pull the code every time. On a side note, if the non-bare repo is the best solution, is there a way to transform the repo from bare to non-bare? Thanks
Asked
Active
Viewed 1,402 times
1 Answers
1
I usually just pull (e.g., clone) a fresh non-bare repo into a clean directory-- there's no chance of left-over build products causing unexpected behavior.
To get a non-bare repo from a bare one, simply do a git checkout
or git clone
to another location, as in this post: getting a working copy of a bare repository.