[git-users] Re: deleted local changes via checkout

2011-05-17 Thread Thorolf Schulte
Hi Thomas,

thanks for your reply. Somehow (after several checkouts) the data is
back. I really should read more about Git and its usage to avoid such
problems.
>From now on I will do more "add" :)

Thanks again,
Thorolf

On 17 Mai, 09:46, Thomas Ferris Nicolaisen  wrote:
> Hi Thorolf,
>
> I'm afraid you've fallen out of Git's "mercy" by not adding these changes to
> the index, or stashing them. Local changes are not specific for any branch,
> so to speak. They don't "stick" to the branch you're in before you commit.
>
> By adding your files to the index, Git will not overwrite them anymore when
> you do a checkout:
>
> git add -A
>
> Alternatively, you can stash the changes:
>
> git stash save "some changes"
>
> This will remove the changes while storing them in a stash that you can
> recover later on with "git stash pop". See "git stash help" for more info.
>
> Now, this being said, I want to come back to your original problem: Doing
> "git checkout master" (switching to a branch) will not overwrite any
> changes, as far as I can see. Also a pull will refuse to overwrite local
> changes.
>
> Therefore I think you might be forgetting one step you did after switching
> to master. Did you do something like "git checkout ." or "git clean"?

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: deleted local changes via checkout

2011-05-17 Thread koshy Koshy
thx. No i did not do git add -A or stash.

On Tue, May 17, 2011 at 5:46 PM, Thomas Ferris Nicolaisen
wrote:

> Hi Thorolf,
>
> I'm afraid you've fallen out of Git's "mercy" by not adding these changes
> to the index, or stashing them. Local changes are not specific for any
> branch, so to speak. They don't "stick" to the branch you're in before you
> commit.
>
> By adding your files to the index, Git will not overwrite them anymore when
> you do a checkout:
>
> git add -A
>
> Alternatively, you can stash the changes:
>
> git stash save "some changes"
>
> This will remove the changes while storing them in a stash that you can
> recover later on with "git stash pop". See "git stash help" for more info.
>
>
>
> Now, this being said, I want to come back to your original problem: Doing
> "git checkout master" (switching to a branch) will not overwrite any
> changes, as far as I can see. Also a pull will refuse to overwrite local
> changes.
>
> Therefore I think you might be forgetting one step you did after switching
> to master. Did you do something like "git checkout ." or "git clean"?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To post to this group, send email to git-users@googlegroups.com.
> To unsubscribe from this group, send email to
> git-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/git-users?hl=en.
>



-- 
*
regards
Koshy C Koshy*
ko...@tek1.com.au
+61 3 95748893
www.tek1.com.au
* 7/17-19, Miles Street, Mulgrave, vic 3170*
*Australia
**Steel Detailing, General Drafting*

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: deleted local changes via checkout

2011-05-17 Thread Thomas Ferris Nicolaisen
Hi Thorolf,

I'm afraid you've fallen out of Git's "mercy" by not adding these changes to 
the index, or stashing them. Local changes are not specific for any branch, 
so to speak. They don't "stick" to the branch you're in before you commit.

By adding your files to the index, Git will not overwrite them anymore when 
you do a checkout:

git add -A

Alternatively, you can stash the changes:

git stash save "some changes"

This will remove the changes while storing them in a stash that you can 
recover later on with "git stash pop". See "git stash help" for more info.



Now, this being said, I want to come back to your original problem: Doing 
"git checkout master" (switching to a branch) will not overwrite any 
changes, as far as I can see. Also a pull will refuse to overwrite local 
changes.

Therefore I think you might be forgetting one step you did after switching 
to master. Did you do something like "git checkout ." or "git clean"?

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.