[git-users] Re: How do you switch head location without changing files?

2015-05-10 Thread Michael
Last question for tonight

 Lets say you've got files set up to commit to one point in the tree, but 
 you're actually in a different location. How do you move where you are / 
 where a commit will go, without altering the files?

 keybounceMBP:Loot++ michael$ git stash
 Saved working directory and index state WIP on (no branch): 4194cda First 
 chunk
 ...
 
 Git is now telling me that there are no changes, yet I had a commit ready 
 that removes a hunk from the commit on branch chest.

So git gui will let me amend my last commit, which can give me what I want -- 
the updated file in the repository for fetching out and using elsewhere.

But what I want is not to amend the commit (with one less hunk), but a commit 
showing a restore of this hunk

How is that done?

 
 ---
 Entertaining minecraft videos
 http://YouTube.com/keybounce
 

---
Entertaining minecraft videos
http://YouTube.com/keybounce

-- 
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/d/optout.


[git-users] Re: How do you switch head location without changing files?

2015-05-10 Thread Michael

On 2015-05-09, at 11:03 PM, Michael keybou...@gmail.com wrote:

 Lets say you've got files set up to commit to one point in the tree, but 
 you're actually in a different location. How do you move where you are / 
 where a commit will go, without altering the files?

Alright, what happened here?

I figured this is what the stash is for, right? Stash a change, move with 
checkout, pop the change.

keybounceMBP:Loot++ michael$ git stash
Saved working directory and index state WIP on (no branch): 4194cda First chunk
HEAD is now at 4194cda First chunk
keybounceMBP:Loot++ michael$ git checkout chest
Previous HEAD position was 4194cda... First chunk
Switched to branch 'chest'
keybounceMBP:Loot++ michael$ git help stash
...
keybounceMBP:Loot++ michael$ git stash pop
...

Git is now telling me that there are no changes, yet I had a commit ready that 
removes a hunk from the commit on branch chest.

---
Entertaining minecraft videos
http://YouTube.com/keybounce

-- 
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/d/optout.