Tag: git submodules

composer private package based on gitlab is identified as git submodule

I made some private packages for composer on company’s gitlab. But when require my private package on other project,it is identified as a git submodule,so I can’t push it to the production environment. I follow composer document to alter my project’s composer.json. I also try the Satis,but it turn on the same result—submodule. When I […]

Using non-npm-package git submodules in npm packages

How can I update non-npm-package git-submodules in my npm package before install? I’m using git and have a node.js module that depends on an external project also hosted in a git repository. I added the external project as a submodule and now I’m trying to make an npm package. Since the external dependency is not […]

C++ with git and CMake: How to build submodules with specific parameters?

Consider a C++ project, organized in a git repository. Assume that the git repository has a submodule from which a library is built on which the (super)project depends. If the (super)project depends not only on the library but on the library built with specific (CMake) parameters, how can it be ensured that the submodule is […]

Restoring deleted submodules

Suppose that I have a submodule dir1/dir2 (created via the steps shown below). How do I restore the submodule dir2 after having deleted it? git submodule update complains that the submodule does not exist, and git reset HEAD –hard restores dir2 but not its contents. I am creating the submodule in the following way : […]

Subdirectory from github as a git submodule

A lots of repos for python on github use project structure for setuptools (for example https://github.com/omab/django-social-auth). But I want to make folder with module core to my project as a submodule. Can I use subdirectories from remote repo as a submodule in my repo?

Git: don't store history of submodule

I have the following setup: One git repo (lets call it “libutil”), and a lot of projects using said libutil as a git submodule. What I want: to be able to change, commit and push my libutil from every project folder to have (physically, not just a symlink or sth.) said libutil inside every project […]

Workflow to customise Django Applications and contrib/merge upstream

How can I pull 3rd party Django apps into my Djano project if they require small code changes? I need to be able to: Merge upstream changes Submit pull requests for new features/mods Use the modified app in multiple projects Be able to deploy the modified app with my Django project Keep things private (optional) […]

Keep files on working tree but make them available to any branch?

I’d like to have a few files of code available to any branch, but keep those files on their own branch (rather, “branch”, since this might not be possible with branches). Is there a better way to do this than putting the code in another repository and adding a submodule? I’d like to keep the […]

Git submodules best practice – always use ssh protocol over https?

I work on a lot of projects that use submodules, and some of them are added to their parent repos using a combination of both the https and ssh protocols, as if it’s not important which one. SSH protocol has benefits that it uses ssh keys, but requires users set up those keys first. I’d […]

WordPress as git submodule, accidentally updated through WP admin instead of git, now modified content

I followed David Winter’s workflow to “Install and Manage WordPress with Git.” WordPress is a git submodule. On the latest WordPress 3.9 upgrade, I accidentally updated through the WordPress admin instead of via git. Now when I run git status I get: modified: wordpress (modified content, untracked content) Which makes sense. But I can’t commit […]

Git Baby is a git and github fan, let's start git clone.