{"id":25738371,"url":"https://github.com/blackstareye/deepcopy_submodules","last_synced_at":"2025-02-26T07:30:10.542Z","repository":{"id":201036299,"uuid":"354665745","full_name":"Blackstareye/deepcopy_submodules","owner":"Blackstareye","description":"This bash program helps to migrate or deploy git projects with many submodules from a private area (like a LAN), to a public area (like github).","archived":false,"fork":false,"pushed_at":"2021-04-05T00:19:23.000Z","size":167,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-10-18T17:46:51.247Z","etag":null,"topics":["bash","blackeye","blackeyem","blackstareye","deepcopy","git","github","gitmodules","lan","network","public","submodule","submodules"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Blackstareye.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-04-04T23:16:19.000Z","updated_at":"2023-10-18T17:46:53.856Z","dependencies_parsed_at":null,"dependency_job_id":"9f0a1875-0ca0-44da-addb-46c51c43d57e","html_url":"https://github.com/Blackstareye/deepcopy_submodules","commit_stats":null,"previous_names":["blackstareye/deepcopy_submodules"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blackstareye%2Fdeepcopy_submodules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blackstareye%2Fdeepcopy_submodules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blackstareye%2Fdeepcopy_submodules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blackstareye%2Fdeepcopy_submodules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blackstareye","download_url":"https://codeload.github.com/Blackstareye/deepcopy_submodules/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240811103,"owners_count":19861352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","blackeye","blackeyem","blackstareye","deepcopy","git","github","gitmodules","lan","network","public","submodule","submodules"],"created_at":"2025-02-26T07:30:09.415Z","updated_at":"2025-02-26T07:30:10.362Z","avatar_url":"https://github.com/Blackstareye.png","language":"Shell","readme":"\u003c!--\n*** Thanks for checking out the Best-README-Template. If you have a suggestion\n*** that would make this better, please fork the repo and create a pull request\n*** or simply open an issue with the tag \"enhancement\".\n*** Thanks again! Now go create something AMAZING! :D\n***\n***\n***\n*** To avoid retyping too much info. Do a search and replace for the following:\n*** Blackeye, deepcopy_submodules, BlackeyeM, private_blackeye+github@posteo.de, Deep Copy of Submodules, project_description\n--\u003e\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003c!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n\u003c!-- [![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url] --\u003e\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Blackstareye/deepcopy_submodules\"\u003e\n    \u003cimg src=\"images/Logo_Small.png\" alt=\"Logo\" width=\"100\" height=\"95\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eDeep Copy of Submodules\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    This bash program helps to migrate or deploy git projects with many submodules from a private area (like a LAN), to a public area (like github).\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/Blackstareye/deepcopy_submodules/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/Blackstareye/deepcopy_submodules/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails open=\"open\"\u003e\n  \u003csummary\u003e\u003ch2 style=\"display: inline-block\"\u003eTable of Contents\u003c/h2\u003e\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgements\"\u003eAcknowledgements\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\n![Console Example Output](images/console_output.png)\n\n  This bash program helps to migrate or deploy git projects with many submodules from a private area (like a LAN), to a public area (like github).\n\n  I made it because I had exactly that situation: having a local git server AND a public one. When I wanted to migrate some Projects (and they had many submodules) the issue was always doing the exactly steps over and over again:\n\n1. cloning the project from the private repo\n2. changing the .gitmodules file and changing each url to the \"new remote\"\n3. changing the .git/conf file and changing each url to the \"new remote\"\n4. deleting the modules from .git/modules and /modules\n5. adding remote and push each submodule\n6. adding remote and push \"root\" git repo\n\nAlso it was a mess doing that steps over and over and then realising it's a faulty url...\n\nSo I made this project.\n\n### Funfact - Trivia\n\nI also tried some test concepts I learned in university for testcoverage. It was also an ..let's say experience writing unit test in and for bash oO.\n\nHave a look on [Test Coverage](https://github.com/Blackstareye/deep_copy_submodules_test/blob/cc6e981a8a8f977e83afe5fcea58bae45756e76f/testcoverage.md)\n  \n## Getting Started\n\nTo get a local copy up and running follow these simple steps.\n\n1. clone the repo\n2. have a look on the config.conf (see [config](config.conf))\n3. cd to the cloned repo and run `install.sh`:\n   1. \u003e `cd \u003ccloned_repo\u003e`\n   2. \u003e`bash install.sh`\n4. run the program\n   1. \u003e `bash deep_copy_submodules.sh \"remote\" \"\u003cprivate_url\u003e\" \"\u003cpublic_url\u003e\"`\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\n```bash\n# try deep deep_copy_submodules.sh --usuage for usuage information\ndeep deep_copy_submodules.sh --usuage\n\n# remote private repo\nbash deep_copy_submodules.sh \"remote\" \"https://privatefoo.bar\" \"https://public_foo.bar\"\n# ssh private repo\nbash deep_copy_submodules.sh \"ssh\" \"git@git-server\" \"https://public_foo.bar\"\n# local private repo\nbash deep_copy_submodules.sh \"local\" \"/foo/bar/git_repo\" \"\u003cpublic_url\u003e\"\n\n```\n\n### Parameter\n\n* --help  Shows the help for that script\n* --usuage Shows the usuage for that script\n* -v Enables Validation if it is in config not set\n* -t Enables Testing_Connections if it is in config not set\n\n**Validation:** The Connection can be checked before they will be progressed with this flag. This will enable syntax checking of the given urls and parameters. If also **Testing Connections** is enabled, the connections will also be checked with curl.\n\n**Testing Connections:** Connections can be checked before they will be progressed with this flag. A curl request will be used for checking\n\n**WARNING:** If validation is turned off, the urls will be used as they are with no further checking. use this with caution or if you know what you do.\n\n\n### Config\n\nThe Config explanation is added directly to the given config parameter.\nsee: [config](config.conf)\n\n### IMPORTANT NOTES\n\n* SSH can only be used for the first repo not for the uploading target repo\n* Git-Submodules can only be parsed if they don't contain a '-' \"dash\" in the folder and or module name\n  * this relies on the fact, that I parse the sections of the .gitmodules ini into dynamic variables like\n    * `$configuration_submodule[key]=value`\n\n### Known Issues\n\nUnfortunately projects with git lfs do not work on the sytems I use it. So I can't guarantee if it will work. But this is the first issue I will hunt down and fix.\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\nSee the [open issues](https://github.com/Blackstareye/deepcopy_submodules/issues) for a list of proposed features (and known issues).\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nIf you have an idea for amazing feature or a nice way to do things more easily in bash you can submit it like the following:\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Testing\n\n  Have a look on \n  \n  * [README.md](https://github.com/Blackstareye/deep_copy_submodules_test) \n  * [Test Coverage](https://github.com/Blackstareye/deep_copy_submodules_test/blob/cc6e981a8a8f977e83afe5fcea58bae45756e76f/testcoverage.md)\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the GPL version 3. See `LICENSE` for more information.\n\nImages are licensed under the License [Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)](https://creativecommons.org/licenses/by-nc-nd/4.0/)\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nBlackeye - [@BlackeyeM](https://twitter.com/BlackeyeM) - private_blackeye+deepcopy@posteo.de\n\nProject Link: [https://github.com/Blackstareye/deepcopy_submodules](https://github.com/Blackstareye/deepcopy_submodules)\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n## Acknowledgements\n\n* Talks, raw testing, helpful tips and Opinions: [Columbarius](https://github.com/columbarius)\n* [Readme Template](https://github.com/othneildrew/Best-README-Template)\n\nFor Testing, thanks for those amazing projects, that make bash unit testing AT LEAST doable.\n\n* [BATS-Core as Unit Testing Framework](https://github.com/bats-core/bats-core)\n* [BATS-Support for Plugins in BATS](https://github.com/bats-core/bats-support)\n* Plugins:\n  * [BATS Assert](https://github.com/bats-core/bats-assert)\n  * [BATS File](https://github.com/bats-core/bats-file)\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/Blackeye/repo.svg?style=for-the-badge\n[contributors-url]: https://github.com/Blackeye/repo/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/Blackeye/repo.svg?style=for-the-badge\n[forks-url]: https://github.com/Blackeye/repo/network/members\n[stars-shield]: https://img.shields.io/github/stars/Blackeye/repo.svg?style=for-the-badge\n[stars-url]: https://github.com/Blackeye/repo/stargazers\n[issues-shield]: https://img.shields.io/github/issues/Blackeye/repo.svg?style=for-the-badge\n[issues-url]: https://github.com/Blackeye/repo/issues\n[license-shield]: https://img.shields.io/github/license/Blackeye/repo.svg?style=for-the-badge\n[license-url]: https://github.com/Blackeye/repo/blob/master/LICENSE.txt\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://linkedin.com/in/Blackeye\n\n## Additional Info\n\n### used Language\n\nbash\n\n### used Software\n\nbats, shellchecker\n\n### Status\n\npublished\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackstareye%2Fdeepcopy_submodules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackstareye%2Fdeepcopy_submodules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackstareye%2Fdeepcopy_submodules/lists"}