
- #Bitbucket create submodule update
- #Bitbucket create submodule full
- #Bitbucket create submodule code
This is probably preferable to the above solution, since it saves the user the trouble of moving between different pull requests and keeps the review in one place. Instead of having separate pull requests in the child repos, there is just one pull request in the parent repo, covering all the changes. The GUI could be modelled on the Jira issue/subtask feature. The BBS api provides a way to find the parent of a submodule pull request and vice-versa.A pull request option is provided that blocks merging a pull request in the parent repo if there are unmerged submodule pull requests.The diff section of the parent pull request provides an option to show the actual diffs in the child repos.The pull requests in the child repos also show their relationship to the parent pull request, making it convenient to navigate to the parent request. The user can thus easily see the related pull requests, as well as their statuses, and conveniently navigate among them. The resulting pull requests in the child repos are displayed in the parent pull request.A convenience option such as "Create pull requests for submodules" could create pull requests in all submodule branches that have commits but lack pull requests. The branches with new commits are specially marked to make it obvious where pull requests are needed. Example: Having created a pull request in the parent repo, the user sees the submodule branches and creates pull requests in them from the parent pull request. Submodule branches are listed in the pull request for the parent branch and the user can easily create new pull requests in the child repos.The branch page in the parent repo displays related submodule branches and vice-versa. BBS regards these branches as "submodule branches" and notes that they are related to the branch in the parent repo. The result is one or more new branches in the specified child repos. Example: The user selects a given feature branch in the parent repo in BBS and selects the menu entry "Create submodule branches". The user can easily create a branch in a child repo via a branch in the parent repo.a feature branch and pull request in the parent repo, which is changed to reflect the configuration of the system with the new commits in the child reposīBS is not currently supporting this use case well, since it doesn't recognize the parent/child relationship of the branches and pull requests.one or more feature branches and pull requests in the child repos where the real changes are being made.Any change thus requires more than one branch and pull request:
#Bitbucket create submodule code
All comments and thoughts are welcome here on this page.Projects that decide to organize the source code of a complex system into different repos usually use the Git submodule feature to put the repos together into a system. If you find a bug or have a feature request, please open an issue on GitHub. Hence, I had to implement a looping mechanism which does not rely on git submodule foreach.īy open sourcing git-submodule-url-rewrite, I do hope I can provide functionality which maybe does help others. Also, looping over all submodules in a shell script, without git submodule foreach, is not trivial 2 3. Which will connect and clone to the originally referenced repository. You can clone with HTTPS in all your CI/CD jobs, and you can continue to use.

The above configuration instructs Git to automatically deduce the URL to use when cloning sources. gitmodules file: submodule 'project' path project url.

#Bitbucket create submodule update
This means you have to run git submodule update -init -recursive first. When your submodule is on the same GitLab server, you can also use relative URLs in your. Please note that git submodule foreach evaluates an arbitrary shell command in each checked out submodule 1. Using recursion you can simply rewrite submodules of submodules of submodules of … You get the idea.īut I can just implement the same recursion with git submodule foreach -recursive 'git config.

But in addition, git-submodule-url-rewrite provides the convenience of regex and a recursive ( ) switch. This is exactly what git-submodule-url-rewrite does. Why should I use git-submodule-url-rewrite? gitmodules submodule.js.url '' $ git submodule sync Installing the command is as simple as copying the script somewhere to your $ and making it executable. Git-submodule-url-rewrite is a git command that lets you rewrite submodule urls. The repository Enteee/example-dependency should point to Enteee/example-submodule instead. But since we were creating 1:1 mirrors, the first repository Enteee/example-dependency still points to githubtraining/example-submodule. We can do this exactly the same way as we did it before with githubtraining/example-dependency.
#Bitbucket create submodule full
$ cat example-dependency/.gitmodulesįor a full migration we now also have to mirror githubtraining/example-submodule to Enteee/example-submodule. Remote: Total 39 (delta 5 ), reused 39 (delta 5 ), pack-reused 0 Remote: Compressing objects: 100% (30/30 ), done.
