Manual Code Copying vs Git Submodules
Developers might resort to manual code copying in scenarios where they lack access to proper version control systems, need to quickly prototype or test code in isolation, or are working in environments with limited tooling meets developers should use git submodules when they need to incorporate external libraries, frameworks, or shared components into their main project while keeping those dependencies as separate repositories with their own version history. Here's our take.
Manual Code Copying
Developers might resort to manual code copying in scenarios where they lack access to proper version control systems, need to quickly prototype or test code in isolation, or are working in environments with limited tooling
Manual Code Copying
Nice PickDevelopers might resort to manual code copying in scenarios where they lack access to proper version control systems, need to quickly prototype or test code in isolation, or are working in environments with limited tooling
Pros
- +However, it should be avoided in production codebases because it increases technical debt, makes bug fixes and updates harder to propagate, and violates DRY (Don't Repeat Yourself) principles
- +Related to: version-control, code-reuse
Cons
- -Specific tradeoffs depend on your use case
Git Submodules
Developers should use Git Submodules when they need to incorporate external libraries, frameworks, or shared components into their main project while keeping those dependencies as separate repositories with their own version history
Pros
- +Common use cases include managing third-party dependencies, sharing common code across multiple projects, or working on large, modular applications where different teams maintain separate repositories
- +Related to: git, version-control
Cons
- -Specific tradeoffs depend on your use case
The Verdict
These tools serve different purposes. Manual Code Copying is a methodology while Git Submodules is a tool. We picked Manual Code Copying based on overall popularity, but your choice depends on what you're building.
Based on overall popularity. Manual Code Copying is more widely used, but Git Submodules excels in its own space.
Disagree with our pick? nice@nicepick.dev