On Sat, Sep 5, 2015 at 10:17 AM, Guido Lerch <[email protected]> wrote:

> If shit can happen... it does, I followed your instructions but made a
> mistake, now my changes to the uemis-download.c
> are gone ... :-( HELP !
> Attached the terminal and what I did ... stupid me. I hope I can get my
> changes back.
>

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.

so, first before trying to do a git checkout master, always do a git status
you see in the file that you send me that after you did a git checkout
master this happened:

Guido-Office:subsurface glerch$ git checkout master
M uemis-downloader.c

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 )

but after that you checked out uemis-develop and stashed your changes ( so
you work is saved in the git stash area )

then you did a checkout - master again, git pull, git checkout
uemis-develop, git rebase master

till here everything worked okay, so there's no need to panic

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

There is no tracking information for the current branch.
Please specify which branch you want to merge with.

in wich you gave the git --help command, didn't see anything that could
help you with and panicked.

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

since you only did one git stash, you need to do git stash pop just once to
get your changes back.


>
> Guido
>
> 2015-09-03 23:19 GMT+02:00 Guido Lerch <[email protected]>:
>
>> Thanks Tomaz
>> That's helpful.
>>
>> G. Lerch
>>
>>
>> Donnerstag, 3. September 2015 19:21 +0200 von Tomaz Canabrava <
>> [email protected]>:
>>
>>
>>
>> On Thu, Sep 3, 2015 at 1:51 PM, Guido Lerch <[email protected]
>> <https://e-aj.my.com/compose/?mailto=mailto%[email protected]>>
>> 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
>> [email protected]
>> <https://e-aj.my.com/compose/?mailto=mailto%3asubsurface@subsurface%2ddivelog.org>
>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>>
>>
>>
>
>
> --
> Best regards,
> Guido
>
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to