[git-users] Re: submodules refusing to update checked out branch: refs/heads/master

2012-01-19 Thread Thomas Ferris Nicolaisen
This is a new problem, I guess has little to do with submodules.

I'm guessing that the patch you create does not "fit" into the repository 
where you are trying to apply it, maybe because other changes have occurred 
in the mean time. I can't really say any more without seeing the entire 
error message, the patches you are trying to apply, and the repository you 
are trying to patch.

If you're unable to share the details, you just have to keep reading 
(google "git format patch"), and trying it out (I don't have so much 
experience with patches myself either). 

Try creating a little testing git repo with a few commits, which you clone 
locally, and then try patching changes from one to another, make some 
conflicts, see what happens, and so on. Here's a similar 
exercise: http://www.vogella.de/articles/Git/article.html#gitpatch

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/WC9J1sRokEoJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: submodules refusing to update checked out branch: refs/heads/master

2012-01-19 Thread Johannes Müller
Hi,

On Jan 18, 11:14 pm, Thomas Ferris Nicolaisen 
wrote:
> Also make sure you readhttp://book.git-scm.com/5_submodules.html- and
> maybe try to do something like the simple example 
> here:http://help.github.com/submodules/
Thanks, the github link helped. I tried to follow the instructions of
the previous link when first setting up submodules, though it does not
mention how to set up submodules for remote repositories. I now
removed the submodule and added it with the link to the remote
repository. But the question how I can push my previous commits
remains. Therefore, I did the following in the discarded working
copy:
$git format-patch -2 --stdout > ~/Desktop/cf.patch
Next I tried to apply the two commits to the newly set up submodule:
$ git am ~/Desktop/cf.patch
But ended up with an error message, where a few lines end with ".git/
rebase-apply/patch:LINE_NUMBER: trailing whitespace." and last there
is an "error: patch failed: somefile:11
error: somefile: patch does not apply"
When I check the status afterwards, nothing has changed and git am --
resolve complains, because nothing has changed. I could not find an
explanation for this error.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: submodules refusing to update checked out branch: refs/heads/master

2012-01-18 Thread Thomas Ferris Nicolaisen
I don't have a lot of experience with submodules, but I think we have too 
little information to say what's wrong anyhow. It looks like the remote 
you're trying to push to is a non-bare repository, in other words: not 
correctly configured.

You need to show us the config (git config -l) of both the main repository, 
and the submodule. Then you need to state which commands you performed in 
which directory to get the error message there.

Also make sure you read http://book.git-scm.com/5_submodules.html - and 
maybe try to do something like the simple example here: 
http://help.github.com/submodules/

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/7vcKO0nyAX0J.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.