Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Commit changes to remote repository

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:52:48

Carlos Martín Nieto [off-list ref] writes:
You're trying to push to a non-bare repository and change the
currently active branch, which can cause problems, so git isn't
letting you. There's an explanation of bare and non-bare at
http://bare-vs-nonbare.gitrecipes.de/ but the short and sweet is that
you should init the repo you want to use as the central point with
--bare and do modifications locally and then push there.
An alternative is to push to a temporary, non-checked-out branch.

I sometimes do

  laptop$ git push desktop HEAD:incomming

and then

  desktop$ git merge incomming

The push does not disturb the worktree on the desktop, and the merge is
done manually on the receiving machine.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help