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
- Create a pair of custom branches with the same name in the parent and child repositories.
- In the parent, edit
.gitmodules
to point at the branch im the child. - In the child do the first step of your evolution.
- Push both and inform your colleagues
- Continue working in the child; push and inform your colleagues when appropriate.
- Once your colleagues have approved the work, merge your branch in the child to whatever the main development branch is.
- Edit
.gitmodules
in the parent to point to the merged code. - Push both and inform your colleagues.
No comments:
Post a Comment