# Git Submodule would not work. The push does not work

3 messages from 2012-06-28 to 2012-06-29. Participants: salmanmanekia, Carlos Martín Nieto.
Thread: https://gitlist.dev/t/30926

## salmanmanekia, 2012-06-28 22:54

Subject: Git Submodule would not work. The push does not work
Message-ID: <1340924055050-7562323.post@n2.nabble.com>
URL: https://gitlist.dev/e/1340924055050-7562323.post%40n2.nabble.com

```
I have been trying to create a submodule in git After issuing the git
submodule init i see the folders for the submodule. After that i add, commit
and try to push those files in the master repo but it would not allow me to
do soo

Salman@PC_HOME ~/git/breakit-web-app (master)
$ git push origin master
error: refs/heads/master does not point to a valid object! 
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 421 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: bb/acl: salmanmanekia is allowed. accepted payload.
error: Ref refs/heads/master is at 6a47a0fd398610a75bdab8976f842dc0efd89f86
but expected 00000000000000000000000000000000000000000
remote: error: failed to lock refs/heads/master

To ssh://git@bitbucket.org/majuri/breakit-web-app.git
! [remote rejected] master -> master (failed to lock)
error: failed to push some refs to
'ssh://git@bitbucket.org/majuri/breakit-web-app.git'

--
View this message in context: http://git.661346.n2.nabble.com/Git-Submodule-would-not-work-The-push-does-not-work-tp7562323.html
Sent from the git mailing list archive at Nabble.com.

```

## Carlos Martín Nieto, 2012-06-29 03:36

Subject: Re: Git Submodule would not work. The push does not work
Message-ID: <1340940970.21992.1.camel@centaur.cmartin.tk>
URL: https://gitlist.dev/e/1340940970.21992.1.camel%40centaur.cmartin.tk
In-Reply-To: <1340924055050-7562323.post@n2.nabble.com>

```
On Thu, 2012-06-28 at 15:54 -0700, salmanmanekia wrote:
> I have been trying to create a submodule in git After issuing the git
> submodule init i see the folders for the submodule. After that i add, commit
> and try to push those files in the master repo but it would not allow me to
> do soo

This doesn't seem to be related to submodules.

> 
> Salman@PC_HOME ~/git/breakit-web-app (master)
> $ git push origin master
> error: refs/heads/master does not point to a valid object! 
> Counting objects: 4, done.
> Delta compression using up to 2 threads.
> Compressing objects: 100% (3/3), done.
> Writing objects: 100% (3/3), 421 bytes, done.
> Total 3 (delta 1), reused 0 (delta 0)
> remote: bb/acl: salmanmanekia is allowed. accepted payload.
> error: Ref refs/heads/master is at 6a47a0fd398610a75bdab8976f842dc0efd89f86
> but expected 00000000000000000000000000000000000000000
> remote: error: failed to lock refs/heads/master
> 
> To ssh://git@bitbucket.org/majuri/breakit-web-app.git
> ! [remote rejected] master -> master (failed to lock)
> error: failed to push some refs to
> 'ssh://git@bitbucket.org/majuri/breakit-web-app.git'

There error messages come from a hook being run on the bitbucket
servers. They're the only ones who can know what they mean and how to
solve it.

   cmn

```

## salmanmanekia, 2012-06-29 07:18

Subject: Re: Git Submodule would not work. The push does not work
Message-ID: <1340954291072-7562328.post@n2.nabble.com>
URL: https://gitlist.dev/e/1340954291072-7562328.post%40n2.nabble.com
In-Reply-To: <1340940970.21992.1.camel@centaur.cmartin.tk>

```
Thank you Carlos, I will ask my question at bitbucket forums. But can you
tell me two things:
1: How did you interpret that it was related to hook. Can you explain the
error a bit
2: Am i creating the submodule correctly. Also, shall i create a new branch
for it and init the submoduel there or is it a good idea to do this in
master.



--
View this message in context: http://git.661346.n2.nabble.com/Git-Submodule-would-not-work-The-push-does-not-work-tp7562323p7562328.html
Sent from the git mailing list archive at Nabble.com.

```
