top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Submodule tracking remote master shows modified on super project git status after submodule update --remote

+1 vote
432 views

In my superproject I have two submodules and I want them to track always master master. Using Git 1.8.2.
So I've added "branch = master" to .gitmodules and using git submodule update --remote to pull always recent master.
However everytime submodule master is updated, running superproject git status or diff shows its recorded sha1 has changed.
This doesn't make sense since I am tracking master? Shouldn't it show it has changed only when submodule HEAD is not the branch recorded in my superproject's .gitmodules ??

posted Jun 13, 2013 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

I am getting this there while updating Sub module in my main project

+1 vote

The use case:
"git submodule update" seems to be inefficient when running sequentially on a large .gitmodules file. Assuming a git forest with over 7K gits it takes hours to complete the update (running on Windows+Cygwin)

If not supported, this feature could be a good candidate for "git submodule" enhancement.
What is your opinion or advice?

0 votes

When I update my branch from master it pulls down several files, including some sass files. When I compile, however, gulp alerts me that I am missing .scss files.

I tested this by creating a new fresh branch and running gulp sass. This time there were no errors and I saw the missing .scss had been brought in.

Would anyone know why, on update, I am only getting some of the files from master?

+1 vote

I'm using git 1.9.1 in Ubuntu 14.04.

I have a repository on github, a clone on my desktop and bare repo on a private server, in my desktop the remotes looks like this

all git@github.com:user/repo.git (fetch)
all git@github.com:user/repo.git (push)
all user@server.com:user/repo.git (push)
server user@server.com:user/repo.git (fetch)
server user@server.com:user/repo.git (push)
origin git@github.com:user/repo.git (fetch)
origin git@github.com:user/repo.git (push)

If I commit to master in my desktop and run 'git push all master', the github and the server repos are correctly updated, but if I run 'git status' the message says:

Your branch is ahead of 'origin/master' by 1 commit.
 (use "git push" to publish your local commits)

The message won't update unless I run git fetch or git push origin master. I'd expect the git status to give me a updated status message after calling 'git push all master'.

...