[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Set working copy to a specific SHA1

From: Murphy, Kimberly
Subject: Re: [lmi] Set working copy to a specific SHA1
Date: Thu, 13 Apr 2017 13:03:40 +0000

Vadim Zeitlin wrote: 
> On Wed, 12 Apr 2017 13:27:24 +0000 Greg Chicares
> <address@hidden> wrote:
> GC> Vadim--I think I've found a good solution to the problem below, but
> would
> GC> you handle it differently?
>  In short: I, personally, would, but I'm not sure my solution is really
> better as it would result in entering the awkward "detached HEAD" state
> which can be confusing.
> GC> Kim maintains an lmi repository from which she prepares releases; she
> never
> GC> commits from it. She wants to release code from five commits ago:
> GC>
> GC> git log --abbrev-commit --pretty=oneline
> GC> ae5c2ad Satisfy library dependencies for native builds
> GC> d90ded4 Do not use 'wine' to run native binaries
> GC> bac897e Prefer getchar() to getch()
> GC> fba8064 Install native toolchain in chroot
> GC> 9c7870a Install full vim package in chroot and configure it
> GC> 11ff9f0 Designate release candidate 20170411T2007Z
> GC>
> GC> I suggested doing this in a fully updated local repository:
> GC>
> GC> $git reset --hard 11ff9f0
> GC> $HEAD is now at 11ff9f0 Designate release candidate 20170411T2007Z
> GC>
> GC> in order to prepare the release,
>  This definitely works, but I'd advise doing "git status" just in case
> there are any changes before erasing them and losing them irreversibly
> with
> "git reset --hard". I understand that no changes are supposed to be done
> in
> this working copy, but I just think always checking status before doing
> "reset --hard" is a good instinct to have.

I did the 'git reset --hard' and it worked as expected. Just to check: 

/opt/lmi/src/lmi[0]$git status
On branch master
Your branch is behind 'origin/master' by 5 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
nothing to commit, working directory clean
It's a rarity that I grab the release candidate after other commits but it's 
nice to have a backup plan in the event that it does.

This e-mail transmission may contain information that is proprietary, 
privileged and/or confidential and is intended exclusively for the person(s) to 
whom it is addressed. Any use, copying, retention or disclosure by any person 
other than the intended recipient or the intended recipient's designees is 
strictly prohibited. If you are not the intended recipient or their designee, 
please notify the sender immediately by return e-mail and delete all copies.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]