Quoting Matthieu Stigler <matthieu.stigler@xxxxxxxxx> > 2009/7/30 Dmitry Potapov <dpotapov@xxxxxxxxx>: > > Second, you said >> So, your normally should never push to the branch that is currerently checked out. (New versions of Git will warn you about that). > > Is there a way to avoid that? Manually, do I just need on post A > (against which it was pushed from clone B) to use: > git-reset --hard HEAD > > And if yes, can I automate that in hooks/post-update in A? Or post-commit in B? The standard way to communicate changes to a repository with a working tree A from your repository B is to pretend as if A fetches from B even when you are pushing from B to A.. Here are some recommended readings: * http://git.or.cz/gitwiki/GitFaq#Whywon.27tIseechangesintheremoterepoafter.22gitpush.22.3F * http://git.or.cz/gitwiki/GitFaq#push-is-reverse-of-fetch * "Push into another repository" item in http://www.kernel.org/pub/software/scm/git/docs/everyday.html illustrates this with an example. * http://article.gmane.org/gmane.comp.version-control.git/123331 -- Nanako Shiraishi http://ivory.ap.teacup.com/nanako3/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html