<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 5, 2015 at 10:17 AM, Guido Lerch <span dir="ltr"><<a href="mailto:guido.lerch@gmail.com" target="_blank">guido.lerch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">If shit can happen... it does, I followed your instructions but made a mistake, now my changes to the uemis-download.c<div>are gone ... :-( HELP !</div><div>Attached the terminal and what I did ... stupid me. I hope I can get my changes back.</div></div></blockquote><div><br></div><div>You didn't loose anything, be calm, ahah. There's a long explanation of what happened here, if you just wanna get back to your changes, go to the last line of the email.</div><div><br></div><div>so, first before trying to do a git checkout master, always do a git status</div><div>you see in the file that you send me that after you did a git checkout master this happened:</div><div><br></div><div>Guido-Office:subsurface glerch$ git checkout master</div><div>M<span class="" style="white-space:pre">      </span>uemis-downloader.c</div><div><br></div><div>this means: you have checked out a branch and all the changes that you made to uemis-downloader.c followed your checkout ( because you didn`t stashed or commited them )</div><div><br></div><div>but after that you checked out uemis-develop and stashed your changes ( so you work is saved in the git stash area )</div><div><br></div><div>then you did a checkout - master again, git pull, git checkout uemis-develop, git rebase master</div><div><br></div><div>till here everything worked okay, so there's no need to panic</div><div><br></div><div>the git pull you gave after the git rebase master it means 'pull the changes made in the remote repository uemis-develop' and you don't have a remote repository ( that's why git gave you the error </div><div><br></div><div>There is no tracking information for the current branch.</div><div>Please specify which branch you want to merge with.</div><div><br></div><div>in wich you gave the git --help command, didn't see anything that could help you with and panicked.</div><div><br></div><div>remember, you saved your changes in the git stash area, git stash is a pool of changes that works in a LIFO way, so each git stash will be `popped` back with git stash pop</div><div><br></div><div>since you only did one git stash, you need to do git stash pop just once to get your changes back.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Guido</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">2015-09-03 23:19 GMT+02:00 Guido Lerch <span dir="ltr"><<a href="mailto:guido.lerch@gmail.com" target="_blank">guido.lerch@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div style="text-align:left">Thanks Tomaz<div>That's helpful.<br><br>G. Lerch<br><br><br>Donnerstag, 3. September 2015 19:21 +0200 von Tomaz Canabrava  <<a href="mailto:tcanabrava@kde.org" target="_blank">tcanabrava@kde.org</a>>:<div><div><br>    <div><blockquote style="border-left-width:1px;border-left-style:solid;border-left-color:rgb(252,44,56);margin:10px 10px 10px 5px;padding:0px 0px 0px 10px"><div>
        
        <div>
                
                
                        <div><div dir="ltr"><br><div><br><div>On Thu, Sep 3, 2015 at 1:51 PM, Guido Lerch <span dir="ltr"><<a href="https://e-aj.my.com/compose/?mailto=mailto%3aguido.lerch@gmail.com" target="_blank">guido.lerch@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>I am new to GIT.</div><div><br></div><div>I have read the contribution document that Dirk has pointed me to but are hesitant</div><div>to actually commit anything because I don't want to mess something up or lose my</div><div>changes.</div><div><br></div><div>Here is what I did so far ...</div><div>1. got a master by "git checkout master", "git pull"</div><div>2. created a branch called "uemis-develop"</div><div><br></div><div>My master is pretty old, 2-3 weeks.</div><div><br></div><div>Here are some questions</div><div>1. how can I get a new master and then merge my changes into it without affecting anything except my local repository</div></div></blockquote><div><br></div><div>you don't need to get a new master, don't worry: you will never affect anything except your local repository.<br></div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>2. Does anyone have a quick guide for dummies so I get a quick start that is save ?</div></div></blockquote><div><br></div><div>tons, but I think they all are pretty hard to learn.<br></div><div><br>1 - don't be afraid of losing your work, even if you do things in a wrong way there are ways to revert that.<br></div><div>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 )<br><br></div><div>since your master is pretty old here is what you should do from time to time:<br></div><div>0 - save your work ( git commit ) or store it on the stash temporarely ( git stash )<br></div><div>1 - go back to master (  git checkout master )<br></div><div>2 - update master to the latest commit on the remote repository ( git pull origin master )<br></div><div>3 - go back to your work branch ( git checkout uemis-develop )<br></div><div>4 - try to merge master on your work ( and not the opposite ) - git rebase master (remember, you are on your local branch )<br></div><div>5 - fix any conflicts that happen ( git will show you all the files that have conflicts by running git status )<br></div><div>6 - continue your work happly on top of the current master, in your local branch.<br></div><div>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<br></div><div>8 - run git format-patch master, this will generate all commits in form of a batch of patches.<br></div><div>9 - send us those patches via e-mail.<br><br></div><div>I think this covers mostly a newbie use of git. :)<br><br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Thanks for supporting a newbie.<span><font color="#888888"><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Best regards,<div>Guido</div></div></div>
</font></span></div></div>
<br>_______________________________________________<br>
subsurface mailing list<br>
<a href="https://e-aj.my.com/compose/?mailto=mailto%3asubsurface@subsurface%2ddivelog.org" target="_blank">subsurface@subsurface-divelog.org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
<br></blockquote></div><br></div></div>
</div>
                        
                
                
        </div>

        
</div></blockquote></div></div></div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class=""><font color="#888888">-- <br><div><div dir="ltr">Best regards,<div>Guido</div></div></div>
</font></span></div>
</blockquote></div><br></div></div>