title: How to keep tests apart from the main branch with git?
body: <p>I'm fairly new to git and I'm particularly interested in maintaining test cases for a project within its repository.</p>
  
  <ol>
  <li><p>This is for a small Bash side project and I have a few repositories. I would like to maintain the test cases within the same repo. How can I go about it? Do I maintain a long lived test branch where I merge in changes from the dev branch, run tests and then merge to the release branch? But doing so would force me to cherry-pick the feature/change from the test branch (assuming I also make changes while in the test branch) so that I avoid merging the test cases also.
  The branching models that I looked at talk about running test-suites on new commits to a dev branch as a CI/CD thing running separately. It makes sense for a large project and is convenient but not for a small one?</p></li>
  <li><p>Also, how would I advance the development of the test cases itself? Wouldn't maintaining separate repos for the test cases for each such project just bloat the number of repositories?</p></li>
  </ol>
  
  <p>I was looking for best-practices where I had the following in mind: Maintain a release branch clean of any test artifact. Develop in a separate branch. Test to see if it is worthy to of release, if not make change, test again and merge only the change to the release branch. VonC's answer seems to suite this flow.</p>