[Klug-general] GIT / check out specific revision

james morris jwm.art.net at gmail.com
Thu May 23 10:53:54 UTC 2013


Kinda felt like I should have been able to help here as I use git
quite frequently (at times!). Trouble is I only ever really need to
use such a small subset of what it can do:

git add . -v
git commit -m 'fix the thing that was broken'
git push

and less frequently these individual commands:

git checkout someotherbranch
git checkout somefileimadeasillymistakein
git rm thatfileishoulddelete

anything else and its hats off to big brother google.


On 23 May 2013 11:14, Paul Littlefield <info at paully.co.uk> wrote:
> On 21/05/13 09:44, Paul Littlefield wrote:
>>
>> How do I pull a specific revision of a git repo?
>
>
> Here it is for anyone who's interested...
>
> 1. On the server you have already installed what you want to match:-
>    $ cd /usr/src/samba4/samba-master
>    $ git log -1
>    This will show you have HASH revision number.
>
> 2. On the server you want to install the same:-
>    $ mkdir /usr/src/samba4
>    $ cd /usr/src/samba4/
>    $ git clone git://git.samba.org/samba.git samba-master
>    $ cd samba-master/
>    $ git checkout 8aae8b5bad167ac732b7f8949dfb40aebb2f26a9
>    $ git reset --hard
>
> ...done.
>
>
> :-)
>
> --
>
> Paul Littlefield
>
> Telephone: 07801 125705
> Email: info at paully.co.uk
> Web: www.paully.co.uk
> Twitter: https://twitter.com/paullittlefield
> Wiki: http://wiki.indie-it.com/index.php?title=Special:AllPages
> Blog: http://www.littlefield.info
> Photo: http://gravatar.com/plittlefield
> LinkedIn: http://uk.linkedin.com/in/paullittlefield
>
> Paul Littlefield is environmentally responsible. Please consider the
> environment before printing this email. This email and any attachment is
> intended for the named addressee only, or person authorised to receive it on
> their behalf. The content should be treated as confidential and the
> recipient may not disclose this message or any attachment to anyone else
> without authorisation. If this transmission is received in error please
> notify the sender immediately and delete this message from your email
> system. All electronic transmissions to and from me are recorded and may be
> monitored. Finally, the recipient should check this email and any
> attachments for viruses. Paul Littlefield accepts no liability for any
> damage caused by any virus transmitted by this email.
>
> Notebook LENOVO ThinkPad Edge
> Intel(R) Core(TM) i3 CPU U 380 @ 1.33GHz
> Portage 2.1.11.62 (default/linux/amd64/13.0/desktop, gcc-4.7.2,
> glibc-2.15-r3, 3.7.9-gentoo x86_64)
> Gentoo Base System release 2.1
> X.Org X Server 1.14.0
> xfce-base/xfdesktop-4.10.2
> x11-drivers/xf86-video-intel-2.21.6
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent



More information about the Kent mailing list