Tag: git submodules

Can I organize Git submodules in a flat hierarchy?

Hey guys, I currently working on a .NET project and several .NET libraries which have the following interdependencies (simplified version): Core (library): no dependencies Testing (library): dependencies to Core Serialization (library): dependencies to Core, Testing Client solution: dependencies to Core, Testing, Serialization My goal is to move as much code to the libraries as possible […]

Sharing Specific folder with Two Repositories in Git

Lets say I have a Repository ‘Game’ which contains a folder ‘common’, i want to share the common with another Repository ‘Puzzle’. One constraint is that i dont want to share Game repository’s ‘custom’ folder with Puzzle. ├── Game │   ├── custom │   ├── other-folder │   └── rank └── Puzzle ├── hints ├── puzzle-specific-folders └── […]

How to list existing branches of a git submodule (without initializing it first)?

I have a project with lots of submodules for some specific reason. I just want to know which branches exist for each submodule. I know that I could initialize each submodule with git submodule update –init and perform a git ls-remote –heads {URL} on each submodule to get the currently existing branches of that submodule […]

GitHub and Git reporting two different statuses

My git repo is stating that it is clean, when checked from the commandline: $ git status On branch develop Your branch is up-to-date with ‘origin/develop’. nothing to commit, working directory clean But GitHub for mac is showing that a submodule needs to be added: I prefer to use GitHub, but can’t really proceed as […]

git submodule conflicted pushed

I have a really weird, bad scenario here. Disclaimer, I’m new to git, and I’ve kind of screwed up. SO I have lots of submodules in my fork, based on monodevelop. First: I couldn’t even update my submodules using git submodule update –init –recursive. I tried bunch of similar commands, with rebase, foreach, etc. So […]

What is the recommended Git work flow for class libraries / frameworks?

The information on submodules and subtree is a bit confusing and often scornful and I simply want to know What is the best git work flow for class libraries / frameworks Both subtree and submodule seem like candidates but some recommend just keeping everything in one repository. Scenario So I have a WinForm project that […]

How to do git sub modules and why to use git sub module

I have found an github project and it uses git submodules. What is the usage of git sub modules ? How to create git sub modules ? How they differ it from sub-tree ? Thanks

How can I access only the branch name of a git submodule?

I have a submodule defined in .gitmodules as: [submodule “app/scripts/directives/foo”] path = app/scripts/directives/foo url = git@bitbucket.org:ross_rogers/foo.git branch = my_branch Is there a programmatic way to access this branch parameter from the containing repository? git submodule status produces (without newlines): 074d5c118eeae3bf622c6f878db96d8bf8b3bf47 \ app/scripts/directives/foo \ (heads/my_branch) I’m in a dual environment of Windows CMD shell and Linux […]

Changing an existing submodule's branch

When I initially added my submodule, I specified a particular branch, as seen in the .gitmodule file: [submodule “externals/grpc/grpc”] path = externals/grpc/grpc url = git@github.com:me/grpc.git branch = release-1.0 I want to change to the master branch of my submodule, so I changed the branch in .gitmodules from release-1.0 to master, and for good measure, just […]

Workflow to protect against breaking changes in git submodules

We are currently refactoring code to be shared among different projects in our company. This shared code will be included in other projects as a Git submodule. One thing we’re worried of is breaking changes introduced to the super project from the submodule at certain stages of the project (e.g: a point where we should […]

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