Re: [git-users] Re: HELP! stash pop is failing and I can't get my work out

2013-05-09 Thread Joe Cabezas
actually what are you trying to do?, the subject says something with stash,
and then you talk about merging... seems like i do not undertand the
problem at all...

maybe when you do a stash pop, you have conflicts?, if so

that is a common problem

when you make a stash, actually records in what commit you did that stash,
this guarantees that making pop it that commit wont fail into conflicts...

conflicts happens when you stash, make changes, commit, (pull, etc), and
then you try to stash pop... that can fail for obvious reasons... code
incompatibility etc...

the solution is to checkout to the commit where the stash was created
(using checkout, git reset --hard, or using gitk --all), and then create a
new branch from there

once you have this new branch, you can safely make a stash pop because in
that commit was created..

then you return back to your previous branch and do a merge if needed
git merge master temporalbranch

Afortunately, git provides a single command to do this, if you read the
manual (git help stash) it says...

--
branch branchname [stash]
   Creates and checks out a new branch named branchname starting
from the commit at which the stash was originally created, applies the
   changes recorded in stash to the new working tree and index.
If that succeeds, and stash is a reference of the form
   stash@{revision}, it then drops the stash. When no stash
is given, applies the latest one.

   This is useful if the branch on which you ran git stash save has
changed enough that git stash apply fails due to conflicts. Since the
   stash is applied on top of the commit that was HEAD at the time
git stash was run, it restores the originally stashed state with no
   conflicts.
--

so, anytime you cam make: git stash branch temporalbranch

and then simply... git merge temporalbranch

hope this helps

bye!

-Joe


2013/5/8 Yawar Amin yawar.a...@gmail.com

 Hi,

 On Friday, March 8, 2013 4:06:04 PM UTC-5, Piers H wrote:
  why does git require all these gymnastics just to do a simple merge?
  with SVN it was 1 command, and I never had any issues with it. i don't
  understand.

 You'll need to adjust your workflow a little bit. Git has a different
 philosophy from Subversion, you need to adapt mentally. It's not a great
 hardship.

 Do your local work and commit it. Don't leave any files out of the
 commit(s) if you need them. Commit everything you can.

 Then, do a git pull. If this causes a merge conflict, you can solve it
 like any other merge conflict, in a sane way.

 No need to stash your changes.

 Regards,

 Yawar

  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: HELP! stash pop is failing and I can't get my work out

2013-03-11 Thread Thomas Ferris Nicolaisen
On Monday, March 11, 2013 3:55:14 AM UTC+1, David wrote:

 On 11/03/2013, Konstantin Khomoutov 
 flat...@users.sourceforge.netjavascript: 
 wrote: 
  On Sat, 9 Mar 2013 13:52:14 -0800 (PST) 
  Thomas Ferris Nicolaisen tfn...@gmail.com javascript: wrote: 
  
  If you google the error message, my explanation here is the 4th hit: 
  http://blog.tfnico.com/2012/09/git-stash-blooper-could-not-restore.html 
  
  Thanks for sharing -- this was an interesting read. 
  
  Unfortunately, the link itself leads to nowhere (actually, I just see 
  the most recent post) -- had to search the blog for stash blooper. 

 I also could not see the link content until I permitted javascript from 
   tfnico.com 
   blogger.com 
   blogblog.com 
   google.com 
   googleapis.com 

 After that, the link works. 


Oh, thanks for reporting. I though blogger had some fallback for browsers 
with disabled JavaScript. I've asked them about the feature just now, but 
will probably take time before they develop it.

Another workaround (for all Blogger blogs with dynamic view) is to append 
?m=1 to see the mobile version of the post:

http://blog.tfnico.com/2012/09/git-stash-blooper-could-not-restore.html?m=1

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: HELP! stash pop is failing and I can't get my work out

2013-03-11 Thread Konstantin Khomoutov
On Mon, 11 Mar 2013 13:55:14 +1100
David bouncingc...@gmail.com wrote:

  If you google the error message, my explanation here is the 4th
  hit:
  http://blog.tfnico.com/2012/09/git-stash-blooper-could-not-restore.html
 
  Thanks for sharing -- this was an interesting read.
 
  Unfortunately, the link itself leads to nowhere (actually, I just
  see the most recent post) -- had to search the blog for stash
  blooper.
 
 I also could not see the link content until I permitted javascript
 from tfnico.com
   blogger.com
   blogblog.com
   google.com
   googleapis.com
 
 After that, the link works.

Inexplicable obsessiveness with JavaScript of this platform is also my
pet hate for it, but I used Safari on an Apple product -- where it's
hard (if possible) to turn JS off -- to navigate that link, so
supposedly this wasn't a problem with JS in my case.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: HELP! stash pop is failing and I can't get my work out

2013-03-10 Thread Konstantin Khomoutov
On Sat, 9 Mar 2013 13:52:14 -0800 (PST)
Thomas Ferris Nicolaisen tfn...@gmail.com wrote:

  So, i'm doing the 'stash/pull/pop' dance that git forces me to go
  through when pulling changes into a modified working tree, and it
  has come back with a whole bunch of 'blah blah already exists, no
  checkout', 'could not restore untracked files from stash'.
 
  so now i'm screwed and extremely frustrated.
 
  what am i supposed to do in this situation? how do I get my work
  out of jail?
 
 If you google the error message, my explanation here is the 4th hit: 
 http://blog.tfnico.com/2012/09/git-stash-blooper-could-not-restore.html
 
 Perhaps you'll find that way of explaining it easier to grok.

Thanks for sharing -- this was an interesting read.

Unfortunately, the link itself leads to nowhere (actually, I just see
the most recent post) -- had to search the blog for stash blooper.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: HELP! stash pop is failing and I can't get my work out

2013-03-10 Thread David
On 11/03/2013, Konstantin Khomoutov flatw...@users.sourceforge.net wrote:
 On Sat, 9 Mar 2013 13:52:14 -0800 (PST)
 Thomas Ferris Nicolaisen tfn...@gmail.com wrote:

 If you google the error message, my explanation here is the 4th hit:
 http://blog.tfnico.com/2012/09/git-stash-blooper-could-not-restore.html

 Thanks for sharing -- this was an interesting read.

 Unfortunately, the link itself leads to nowhere (actually, I just see
 the most recent post) -- had to search the blog for stash blooper.

I also could not see the link content until I permitted javascript from
  tfnico.com
  blogger.com
  blogblog.com
  google.com
  googleapis.com

After that, the link works.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.