GIT

Tomaz Canabrava tcanabrava at kde.org
Wed Oct 21 15:50:20 PDT 2015


On Wed, Oct 21, 2015 at 8:35 PM, Guido Lerch <guido.lerch at gmail.com> wrote:

> Hi
>
> At some point in time I would like someone to help me with GIT.
> I find this confusing which is probably confusing to you.
>
> I work on a feature, figure out a bug, when trying to fix this I am
> getting my branches confused,
>

Try to use a git-helper for bash or zsh, I use oh-my-zsh, see how pretty my
git things are:

tomaz at naboo - subsurface (master) : $ git checkout cmake_fixes
tomaz at naboo - subsurface (cmake_fixes) : $

See? my terminal gives me my current branch all the time, this helps a lot.

So, back to your real problem:

You are working on a feature X, let's call it tomaz_is_braindead and then
you found a bug that is on master

guido at guidoland - subsurface (tomaz_is_braindead) : $ git checkout master
guido at guidoland - subsurface (master) : $ git checkout -b fix_tomaz_bug
guido at guidoland - subsurface (fix_tomaz_bug) : $ git checkout -b
fix_tomaz_bug

work work work

guido at guidoland - subsurface (fix_tomaz_bug) : $ git commit -a -s
guido at guidoland - subsurface (fix_tomaz_bug) : $ git format-patch master

send the code you create to the ML

guido at guidoland - subsurface (fix_tomaz_bug) : $ git checkout
tomaz_is_braindead (your original branch)

continue working happly knowing that you fixed a bug that is already in
review, and try to avoid it on your current branch.

at least, this is how I work.

and then you found a bug on the code that is on master:

> ending up in wiping it all away,
> clone subsurface, building branches, reapplying patches etc.
>
> It can't be that difficult ... I read the FM and this didn't help.
>
> I have no GIT-brain ... and lost many hours of dev. time to this :-(
>
> --
> Best regards,
> Guido
>
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151021/467b0341/attachment.html>


More information about the subsurface mailing list