Need help with GIT

Tomaz Canabrava tcanabrava at kde.org
Thu Sep 3 10:21:34 PDT 2015


On Thu, Sep 3, 2015 at 1:51 PM, Guido Lerch <guido.lerch at gmail.com> wrote:

> Hi All,
>
> I am new to GIT.
>
> I have read the contribution document that Dirk has pointed me to but are
> hesitant
> to actually commit anything because I don't want to mess something up or
> lose my
> changes.
>
> Here is what I did so far ...
> 1. got a master by "git checkout master", "git pull"
> 2. created a branch called "uemis-develop"
>
> My master is pretty old, 2-3 weeks.
>
> Here are some questions
> 1. how can I get a new master and then merge my changes into it without
> affecting anything except my local repository
>

you don't need to get a new master, don't worry: you will never affect
anything except your local repository.


> 2. Does anyone have a quick guide for dummies so I get a quick start that
> is save ?
>

tons, but I think they all are pretty hard to learn.

1 - don't be afraid of losing your work, even if you do things in a wrong
way there are ways to revert that.
2 - get a git helper for bash or zsh ( I use oh-my-zsh to help me on git,
by completting commands and always showing the current branch I'm on )

since your master is pretty old here is what you should do from time to
time:
0 - save your work ( git commit ) or store it on the stash temporarely (
git stash )
1 - go back to master (  git checkout master )
2 - update master to the latest commit on the remote repository ( git pull
origin master )
3 - go back to your work branch ( git checkout uemis-develop )
4 - try to merge master on your work ( and not the opposite ) - git rebase
master (remember, you are on your local branch )
5 - fix any conflicts that happen ( git will show you all the files that
have conflicts by running git status )
6 - continue your work happly on top of the current master, in your local
branch.
7 - as soon as your work is done ( finished what you should do on that
branch ), folow 0 - 6 again to reply your work on top of the most current
master
8 - run git format-patch master, this will generate all commits in form of
a batch of patches.
9 - send us those patches via e-mail.

I think this covers mostly a newbie use of git. :)


> Thanks for supporting a newbie.
>
> --
> 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/20150903/f8345ea9/attachment.html>


More information about the subsurface mailing list