Re: git push requires a subsequent git reset --hard ?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jakub Narebski
Date: Tuesday, July 1, 2008 - 10:29 am

"Neshama Parhoti" <pneshama@gmail.com> writes:


This is considered normal.  Push would never touch index nor working
area (although if you are the only user, and you know what you are
doing, you can add "git reset --hard HEAD" to post-receive hook).  It
is the only way: "push" cannot be opposite of "pull" and do a merge
because there is nobody to resolve conflict on remote side.

So you should either do mirroring (1:1 refspec) push into bare
repository (without working directory), or push into remotes section,
remotes/satellite or remotes/mothership, like shown in GitFaq, below.

See also:
* "Why won't I see changes in the remote repo after "git push"?"
  http://git.or.cz/gitwiki/GitFaq#head-b96f48bc9c925074be9f95c0fce69bcece5f6e73
* "How would I use "git push" to sync out of a firewalled host?"
  http://git.or.cz/gitwiki/GitFaq#head-46de97a5ac549d3adf406c22674b3325ae25d09c
-- 
Jakub Narebski
Poland
ShadeHawk on #git
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git push requires a subsequent git reset --hard ?, Neshama Parhoti, (Tue Jul 1, 9:51 am)
Re: git push requires a subsequent git reset --hard ?, Jakub Narebski, (Tue Jul 1, 10:29 am)
Re: git push requires a subsequent git reset --hard ?, Dmitry Potapov, (Wed Jul 2, 6:36 am)
Re: git push requires a subsequent git reset --hard ?, Dmitry Potapov, (Wed Jul 2, 6:45 am)
Re: git push requires a subsequent git reset --hard ?, Neshama Parhoti, (Fri Jul 4, 6:25 am)