Hi Eric,

to not lose your changes, you can create a branch which represents your
current state of your repository. For this, just create a branch with "git
branch fallback" command. It will be a copy of your current branch, so run
this command when you are at master branch.

Then, you can return to your remote master state with "git reset --hard
origin/master". When you want to recover the modifications, just merge the
content of fallback branch: "git merge fallback".


William Seiti Mizuta
@williammizuta
Caelum | Ensino e Inovação
www.caelum.com.br


On Tue, Oct 29, 2013 at 9:07 PM, Eric Fowler <eric.fow...@gmail.com> wrote:

> I did a commit and push into master a while back. I stayed in master and
> made some changes, which I have committed but not pushed.
>
> I want to store the changes but revert my working code to the code I last
> pushed (for some regression testing), without permanently discarding the
> new changes.
>
> How can I do this?
>
> --
> 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.

Reply via email to