* Git-Automerge
@ 2010-04-04 16:47 Nico Schümann
2010-04-04 16:53 ` Git-Automerge Matthieu Moy
2010-04-04 17:00 ` Git-Automerge Ramkumar Ramachandra
0 siblings, 2 replies; 3+ messages in thread
From: Nico Schümann @ 2010-04-04 16:47 UTC (permalink / raw)
To: git
Dear Git people,
after having been convinced by Linus Torvald's talk on git, I've been
using it for some days now.
But there is one thing that just does not get into my mind, or maybe I
am just thinking too complicated.
What I have is a productive system, let's call it MASTER and my
development machine, call it ME.
Now I made a copy of the MASTER tree by
$ git pull me@master:/path/to/stuff
And did some changes:
$ nano -w blablabla
Then I commited:
$ git commit
Everything fine until now.
What I want now are the changes to apper on the MASTER server, so I say
$ git push
But the changes do not appear on the master server. I have to type
# git reset --hard or
# git checkout -f
in order to make the changes appear. Since I do not want to login onto
that MASTER machine every time, what command do I miss on my developer
machine?
Thanks in advantage,
Nico
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git-Automerge
2010-04-04 16:47 Git-Automerge Nico Schümann
@ 2010-04-04 16:53 ` Matthieu Moy
2010-04-04 17:00 ` Git-Automerge Ramkumar Ramachandra
1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Moy @ 2010-04-04 16:53 UTC (permalink / raw)
To: Nico Schümann; +Cc: git
Nico Schümann <nico.schuemann@googlemail.com> 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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git-Automerge
2010-04-04 16:47 Git-Automerge Nico Schümann
2010-04-04 16:53 ` Git-Automerge Matthieu Moy
@ 2010-04-04 17:00 ` Ramkumar Ramachandra
1 sibling, 0 replies; 3+ messages in thread
From: Ramkumar Ramachandra @ 2010-04-04 17:00 UTC (permalink / raw)
To: Nico Schümann; +Cc: git
Hi,
On Sun, Apr 4, 2010 at 10:17 PM, Nico Schümann
<nico.schuemann@googlemail.com> wrote:
> $ git push
>
> But the changes do not appear on the master server. I have to type
>
> # git reset --hard or
> # git checkout -f
git-push only propagates history and updates refs. It doesn't touch
files in the working tree. I suspect you're pushing to a non-bare
remote. Please see --bare option in git-init (1) and this FAQ [0] on
the Git Wiki for more.
[0] https://git.wiki.kernel.org/index.php/GitFaq#Why_won.27t_I_see_changes_in_the_remote_repo_after_.22git_push.22.3F
-- Ram
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-04 17:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-04 16:47 Git-Automerge Nico Schümann
2010-04-04 16:53 ` Git-Automerge Matthieu Moy
2010-04-04 17:00 ` Git-Automerge Ramkumar Ramachandra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).