Tag: git submodules

Moved folder into submodule, now getting “Untracked files would be overwritten” message

I work on a team on a large repo. Recently we decided to move one of the folders into its own submodule — aaa — .git — bbb — ccc — www # this folder is going into its own repo. I followed the instructions to filter out the www folder into its own repo […]

Why don’t commits follow the merge-base error?

Our process for git is a periodic merge down to our master branch so that the changes can be merged back out to our latest features branches. Since out latest rounds of merging from one branch to another, we are running into a problem in which the solution is not clear. We have a repository […]

Run brunch from different directory and use relative paths

We want to use the same build system across multiple projects. I have a working brunch configuration file that I want to put in a git submodule, so that that submodule can be referenced in multiple projects and changes are easily propagated (less fragile than copy and paste and sets authoritative source of brunch-config.js). Putting […]

Merging after directory got turned into submodule

I find that working with git submodules, I often encounter problems merging between commits which do contain a given submodules and those which represent the same code as a normal directory. Small reproducing example: # Create one project, to be used as a subproject later on git init a cd a echo aaa > aa […]

Git submodule update gives “error: invalid key (newline)”

After a painful merge, when I run git submodule update, I get this: >git submodule update error: invalid key (newline): submodule.external/mono-reactive external/mono-reactive.url error: invalid key (newline): submodule.external/mono-reactive external/mono-reactive.update What’s the matter?

Git submodule alternative?

I have a couple of working trees with some dependences. AFAIK, git submodule would enforce the following: have a copy of each working tree (slave) in a subdirectory of each working tree using it (master) the master repository duplicates all the information from slaves I don’t mind the repos getting bigger, but having the copies […]

Git: moving submodules recursively (nested submodules)

I have the following git structure – git-repo a — subdirectory 2015 — git-submodule b — git-submodule c — git-submodule d I would like to move the git submodule c to the folder 2015. I know of “dirty ways” to do this (that involve modifying .git/config and changing gitdir in several of the files in […]

GitPython: how to commit updated submodule

I have been at this for hours now, and although I have a feeling I’m close I can’t seem to figure this out. I’m trying to make a script that takes a git repository, updates a submodule in that repository to a specified version, and commits that change. What works: I can find the repository, […]

How to discard change to git submodule?

I changed the commit pointer of a git submodule: % git status # On branch fix # Your branch is behind ‘origin/fix’ by 1 commit, and can be fast-forwarded. # # Changes not staged for commit: # (use “git add <file>…” to update what will be committed) # (use “git checkout — <file>…” to discard […]

Can't get rid of git submodule

I added some Haml templates to my Rails 3 project with git clone git://github.com/psynix/rails3_haml_scaffold_generator.git lib/generators/haml only to find, when I tried to edit some of those files, that this was a submodule, so I couldn’t commit changes that I made within the lib/generators/haml directory. Now every time I git status, I get # On branch […]

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