Reputation: 99536
I am working on a project that has multiple repositories, some of which are libraries, some applications. A library can be used by the applications and other libraries.
When I work on a feature on the project, I often have to change the code in multiple repositories by first creating a feature branch in each of the repositories. I could name the feature branches the same name, if that helps.
My questions are thus:
While working on the feature branches, sometimes I lose track of which repositories are being affected and then switching between working on the feature branches in the repositories. Is there some command that can tell me which repositories have the feature branches that I created when I lose track of that information?
After I finish working on the feature branches, I push them to GitHub for others to review my code. How can they find out which repositories I changed to implement the feature?
Upvotes: 4
Views: 568
Reputation: 636
Working on projects spanning multiple repos (think of AOSP) can be supported using a (small?) framework of scripts that allow to coordinate changes, checkouts, pushes, etc across repos. This simplifies working with such repo "forests".
Some IDE (such as PyCharm) allow to sync branch switching across multiple projects (especially when used together with the Task feature).
But indeed I am also facing this issue, and the solution I use for now is a small Bash script that iterates over the clones and lists branches; if a branch is not together with the master branch, that indicates that for that clone, commits exist that need to be remembered somehow.
for each checked out repo:
git log --graph --decorate --oneline --simplify-by-decoration
This is still WIP... (but my real hope is to get rid of the many repos, as there is no reason for them to exist separately.)
Upvotes: 2