[csw-maintainers] [offtopic] git presentation

Andrew Robert Nicols andrew.nicols at luns.net.uk
Tue Aug 16 11:29:28 CEST 2011


On 16 August 2011 02:18, Ben Walton <bwalton at opencsw.org> wrote:

> I'm going to be putting together a git presentation for a mostly
> technical audience.  I expect that most of these folks will not have
> used git although a few will have.  I'm curious what those of you who
> use git would present.  What features do you:
>

And I forgot to actually reply to the rest of it ;).


> find hardest to understand?
>
git rebase is probably the hardest to explain - unless people get the
concept of modifying your history and how it differs from a merge.


> wish you'd learned earlier?
>
git rebase -i HEAD~x; then edit a commit; then git reset HEAD~1; then git
add -pi . the relevant bits to break the one commit into sensible logical
comits.

find most dangerous?
>
it's pretty difficult to actually lose commits with git - if all else fails,
you have git reflog. That said:
git reset --hard HEAD~1
is pretty dangerous if you don't mean to use it.

Also:
*Always* start by branching before doing anything like a git rebase, or a
git merge, or a feature branch, or a bug fix. When you start using tools
like gerrit, it's almost impossible to use without feature branches - and
rightly so!

Andrew

-- 
Systems Developer

e: andrew.nicols at luns.net.uk
im: a.nicols at jabber.lancs.ac.uk
t: +44 (0)1524 5 10147

Lancaster University Network Services is a limited company registered in
England and Wales. Registered number: 04311892. Registered office:
University House, Lancaster University, Lancaster, LA1 4YW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20110816/3e640624/attachment-0001.html>


More information about the maintainers mailing list