1

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

sitting-duck
  • 961
  • 1
  • 10
  • 22
Claudio Mezzasalma
  • 646
  • 1
  • 5
  • 23

1 Answers1

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.

Community
  • 1
  • 1
rholmes
  • 4,064
  • 3
  • 25
  • 34