Tag: git submodules

How to make Git submodules easier for non-programmers?

Our small software shop recently migrated from Subversion to Git, as we programmers found Git better. The migration wasn’t painless, we’re having problems with the submodules feature. My main gripe is that once a repo contains submodules, you can’t simply clone it and expect things to work. You have to do an extra step to […]

git add remote in submodule

the .gitmodule file have the list of submodule url and path, similar to this [submodule “.vim/bundle/subRepo”] path = .vim/bundle/subRepo url = https://git.com/sub/repo and in the .git/config of core repo have list of remotes [remote “origin”] fetch = +refs/heads/*:refs/remotes/origin/* url = git@otherRepo.com when git submodule init git submodule update I get the submodules. how add one […]

git submodule merge conflict: how to visualize?

I was pretty happy when I found out lately about git submodule summary which shows me nicely by which commits the checked out commit of a submodule is ahead or behind the reference in the repository. Now when I am in the middle of a merge with submodule conflicts, the same command does not produce […]

How to write git commit messages for submodule updates?

I always struggle to write good git commit messages for commits which did nothing except update which commit a submodule is on. What I really want to write is “just read the freaking submodule commit messages!” Perhaps a slightly nicer solution is, does there exist something which goes to the submodule and concatenates all of […]

git deploy with submodules

I’ve been looking into different ways of deploying sites using git, and found the following tutorial: http://42pixels.com/blog/quick-and-dirty-git-deployment I like the ideas presented in this tutorial, and would be keen on using it for my sites, only it doesn’t seem to support submodules. Is there anyway that this can be changed so that submodules are also […]

git + go – how to handle subprojects with go get

I use the version control system git for my software. And “within” the source code, I use go get to automatically fetch software from github. How can I handle the “double git” situation? When I run git add on the directory src/github.com/somename/someproject, which is a git repository in itself, will this add anything? (it doesn’t […]

Ignore submodule dirty status on commit

I have a repository with a submodule. For me, this submodule is read-only, so I’m using submodule.Module.ignore=dirty. This works fine for ‘git status’, but when I commit, the whole submodule is scanned and in git’s comments I can see that it’s dirty. Is there a way to avoid this?

Git index Hanging on To Old Submodule Path?

I have a repository which has two submodules. Git is complaining when I run git submodule init or git submodule update, with the following error: fatal: no submodule mapping found in .gitmodules for path ‘AppName.xcodeproj/..Vendor/AFNetworking’ My submodules were not all in the same directory, and I decided to clean up the project. I used to […]

Why does `git submodule` require fetching from a remote repository everytime?

Judging just from the number of results for “git submodule” here on SO alone, this is clearly a commonly asked and easily confused topic, so I will try to be as precise as possible. Forgetting everything about updating/committing/branching submodules (which I understand greatly complicates things), why do submodules get emptied each time I change branches? […]

strange output during git merge

I am in a clone named /private/gmills, and I ran git merge main_int. I am seeing a reference to another clone for some other user on a different machine. What does this mean? I have only 1 remote configured and it isn’t pointing to this other clone or machine. Warning message : warning: Failed to […]

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