Tag: git submodules

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 […]

is there a way to load non-editable/read-only git submodule?

the git command “submodule” downloads the whole source of the project AND it is editable… is there a way to make the submodule read only? I just want to have one of my git projects to be dependent on another, maybe submodule is not the correct way? what is a better/correct way of accomplishing this?

git add submodule hash directly

Is there a way using git commands to directly update the submodule hash in the index? If not, is there a way to manually change it via modifying text somewhere in the .git directory? I want to point to a specific commit in a submodule, but I want to avoid having to go into that […]

Track file in master repository which is ignored in submodule

I have a structure like this: /.gitignore /submodule/.gitignore /submodule/file.txt Inside my submodule the .gitignore file ignores file.txt. That is very much logical for the submodule. But in my root I would like to add “file.txt” to the repo. Is that even possible? !submodule/file.txt Adding the line above to /.gitignore does not work. So for my […]

Does git submodule branch switch along with main project's branch?

Recently I got to know git submodules. They appear to be self-sufficient projects with their own git structure and branches. When I switch main project’s branch, does this also switch submodule’s branch? How does git handle this situation?

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