Path of the reference repo to use during submodule updateįolder containing a repository that will be used by git as a reference during submodule clone operations. If the parent project is cloned with ssh, then the authenticated submodule references must use ssh as well. If the parent project is cloned with https, then the authenticated submodule references must use https as well. Submodule credentials require that the submodule repository must accept the same credentials as the parent project. Enabling this extension will provide the parent repository credentials to each of the submodule repositories. Submodule updates do not use credentials by default. Use credentials from the default remote of the parent project. Use credentials from default remote of parent repository Retrieve the tip of the configured branch in. Update tracking submodules to tip of branch Without this option, submodules which contain other submodules will ignore the contained submodules. Specify a timeout (in minutes) for clone and fetch operations.ĭeselect this to perform a clone without tags, saving time and disk space when you want to access only what is specified by the refspec, without considering any repository tags. Timeout (in minutes) for clone and fetch operations This option will be ignored if the folder is not available on the agent. Specify a folder containing a repository that will be used by git as a reference during clone operations. Path of the reference repo to use during clone Git will only download depth commits from the remote repository, saving time and disk space. Set shallow clone depth to the specified number of commits. This can save time and disk space when you just want to access the latest version of a repository. Git will not download the complete history of the project. Perform a shallow clone by requesting a limited number of commits from the tip of the requested branch(es). If this is not enabled, then the plugin default refspec includes all remote branches. This can save time, data transfer and disk space when you only need to access the references specified by the refspec. I hope that this post can be similarly helpful for anyone attempting this process on a Mac.Perform initial clone using the refspec defined for the repository. Git commit -m ‘Moves module-d files into new subdirectory’Īnd that’s it! It might look like a lot of steps, but it was pretty straightforward and worked perfectly! Passing It Onĭuring this process, I was very grateful to haveĪs a starting point. Git merge module-d-repository/master -allow-unrelated-historiesįor file in $(ls -a | grep -v ^struts-portal$ | grep -v ^module-a$ | grep -v ^module-b$ | grep -v ^module-c$ | grep -v ^module-d$ | grep -v ^\\.git$ | grep -v ^\\.$ | grep -v ^\\.\\.$) do git mv $file module-d/ done Add a remote repository for and fetch the existing repository:.Essentially, working from a newly created repository, for each existing repository we’d: Our basic strategy was to move each repository into a single new repository based on anĮric’s work utilized a Windows environment and we’d be working on a Mac, so the scripts would be different, but the approach Needless to say, we didn’t want to lose them. Invaluable when working with legacy code, as they can provide important insight on past technical decisions. While moving the repositories, our top priority was to ensure the change histories for each repository were maintained.Ĭhange histories are important communication artifacts and can be So, as we started the migrationĮffort, we decided to first consolidate the repositories into a single repository. Would be difficult, and the existing repository structure was not truly necessary. Keeping track of the changes across multiple repositories during the review process However, our migration approach was going to involve modifying files in both the existing Struts modules and in the new Spring Theory, we could have simply created a new repository for the new Spring Boot code and moved new and existing code into this repository as necessary. The existing application was housed across five different Git repositories hosted on Bitbucket. I recently helped a client incrementally migrate a customer-facing portal from Struts to Spring Boot (more on that in aįuture post!). Nickie McCabe Consolidating Git Repositories while Maintaining Change History
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |