My team is working on building a bunch of automated tests for our project. Each automated test targets a "customization" our client ordered to modify an existing website.
The current flow is:
checkout -b unique-customization-test-branch
- magic code stuffs
git commit && git push
- create pull request into dev
Each automated test makes use of a
FooBar.groovy library that I'm constantly updating, creating various functions to streamline the process of building these tests. Sometimes one of my teammates will need a new function added to
FooBar.groovy, e.g. verify no duplicate rows exist in a table, and ask me to add that for them to use in their current branch / automated test.
Of note: there's a no-pushing-to-dev policy in place, so right now what we're doing is:
- I checkout a new
- add function to the
- commit, push, and PR into dev
- my teammates run
git checkout origin/development -- FooBar.groovyto get the latest changes
But then they have to either
- discard the pulled changes to
FooBar.groovyany time they switch branches to avoid conflicts and mucking the history, which is a hassle for the git savvy and nigh impossible without help for the git novices and often leads to
FooBar.groovyaccidentally getting committed in their test branch or
FooBar.groovyto their branch and just try to ensure that they've pulled the most recent version of it into their branch before creating the PR so as to not overwrite newer code
There has to be a better way. This seems super not-optimal. Any advice?