2023-02-03

Now what?

Challenge of the day:

Search the web for a git workflow that is suitable for cases where you need to take a sub-module through a non-trivial evolution (that is something you'll be working on for a while, making multiple commits on and want to share with your colleagues as you go).

Go ahead. I'll wait. Probably for quite a long time.

You see, the web is teaming with tutorials and workflow articles on submodules, but they rarely get farther than setting up a repository and/or checking one out. At that point the article is already too long for a blog post: you readers are bored and have deleted the browser tab displaying your hard-won expertise.

I thinking of trying something like

  1. Create a pair of custom branches with the same name in the parent and child repositories.
  2. In the parent, edit .gitmodules to point at the branch im the child.
  3. In the child do the first step of your evolution.
  4. Push both and inform your colleagues
  5. Continue working in the child; push and inform your colleagues when appropriate.
  6. Once your colleagues have approved the work, merge your branch in the child to whatever the main development branch is.
  7. Edit .gitmodules in the parent to point to the merged code.
  8. Push both and inform your colleagues.

No comments:

Post a Comment