Thread (1 message) 1 message, 1 author, 2016-06-15
  • (off-list ancestor, not in this archive)
  • Re: Git-Automerge · Matthieu Moy <hidden> · 2016-06-15

Re: Git-Automerge

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

Nico Schümann [off-list ref] writes:
But the changes do not appear on the master server. I have to type

# git reset --hard      or
# git checkout -f
You pushed to a checked-out branch. You shouldn't do that, and recent
Git prevent you from doing it.

The reason Git cannot do the merge automatically is that a merge can
go wrong, and may require a human interaction to resolve conflicts.
Hence, "push" never does a merge, only "pull" (and obviously local
merge) will do.

You can do

client-machine$ git push URL-OF-SERVER HEAD:tmp

to push your current HEAD to a branch named "tmp" on the server, and
then

server-machine$ git merge tmp

to merge the changes in the current branch of the server. Another
option is to have a bare repository reachable from both machines, and
both machine would push/pull to this repository (just like you'd do
with a centralized version control system).

-- 
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