Re: [AMBER-Developers] URGENT: weird commit to master branch at git.ambermd.org

From: Scott Le Grand <varelse2005.gmail.com>
Date: Fri, 20 Apr 2012 09:35:55 -0700

That was me. Sorry. And yeah, I did that while researching (incorrectly)
how to get a push there to succeed which apparently did far worse
things...



On Fri, Apr 20, 2012 at 7:24 AM, Jason Swails <jason.swails.gmail.com>wrote:

> On Fri, Apr 20, 2012 at 10:12 AM, Daniel Roe <daniel.r.roe.gmail.com>
> wrote:
>
> > I have two separate copies of the git repo, and the last commit I have
> > in both masters is 'e786ee21de003a808052386466481623a5bfed2e' (the
> > first one that is discarded in that message), and the last time I
> >
>
> I confirm this is the last commit I have in my tree. I also did a git pull
> last night, and based on emails only the spfp-dev has been pushed to since
> then. I'm guessing what happened is someone did a
>
> git push -f/--force
>
> Here's what man git-push has to say:
>
> -f, --force
> Usually, the command refuses to update a remote ref that is not
> an ancestor of the local ref used to overwrite it. This flag disables the
> check. This can cause the remote repository to lose commits; use
> it with care.
>
> This sounds exactly like what happened. In general, please nobody use "git
> push -f". Some git versions will push to all tracked branches by default
> (i.e., if you have master and adqmmm-dev on your local repository both
> tracking the corresponding repos from master, a "git push" while you are on
> master will push both adqmmm-dev and master, even though you are not on
> adqmmm-dev at the moment). Therefore, "git push -f" may affect more
> branches than you expect (e.g., master).
>
> It is better to be explicit if you need to rebase a branch. Do something
> like this:
>
> git push <remote> <commit_id>:<branch>
>
> This will set the HEAD of <branch> on the <remote> (often origin) to the
> commit <commit_id>. I've never actually seen the need to use a "git push
> -f" before, so it can probably be avoided in general.
>
> All the best,
> Jason
>
> --
> Jason M. Swails
> Quantum Theory Project,
> University of Florida
> Ph.D. Candidate
> 352-392-4032
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers
>
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Apr 20 2012 - 10:00:02 PDT
Custom Search