Skip to main content
added 198 characters in body
Source Link
knittl
  • 269.3k
  • 59
  • 339
  • 405

Use the ref-log:

git branch fixing-things HEAD@{1} git reset --soft fixing-things 

You should then have all your previously amended changes in your working copy and can commit them to a new commit.

To see a full list of previous head commits type git reflog.

You might find my other answer helpful if you are looking for a single command to achieve this and are not afraid of low-level plumbing commands.

Use the ref-log:

git branch fixing-things HEAD@{1} git reset --soft fixing-things 

You should then have all your previously amended changes in your working copy and can commit them to a new commit.

To see a full list of previous head commits type git reflog

Use the ref-log:

git branch fixing-things HEAD@{1} git reset --soft fixing-things 

You should then have all your previously amended changes in your working copy and can commit them to a new commit.

To see a full list of previous head commits type git reflog.

You might find my other answer helpful if you are looking for a single command to achieve this and are not afraid of low-level plumbing commands.

added 7 characters in body
Source Link
knittl
  • 269.3k
  • 59
  • 339
  • 405

Use the ref-log:

git branch fixing-things HEAD@{1} git reset --soft fixing-things 

You should then have all your previously amended changes in your working copy and can commit them to a new commit.

To see a full list of previous head commits type git reflog

Use the ref-log:

git branch fixing-things HEAD@{1} git reset fixing-things 

You should then have all your previously amended changes in your working copy and can commit them to a new commit.

To see a full list of previous head commits type git reflog

Use the ref-log:

git branch fixing-things HEAD@{1} git reset --soft fixing-things 

You should then have all your previously amended changes in your working copy and can commit them to a new commit.

To see a full list of previous head commits type git reflog

added 122 characters in body
Source Link
knittl
  • 269.3k
  • 59
  • 339
  • 405

useUse the ref-logref-log:

git branch fixing-things HEAD@{1} git reset fixing-things 

youYou should then have all your previously amended changes only in your working copy and can commit againthem to a new commit.

toTo see a full list of previous indiceshead commits type git refloggit reflog

use the ref-log:

git branch fixing-things HEAD@{1} git reset fixing-things 

you should then have all your previously amended changes only in your working copy and can commit again

to see a full list of previous indices type git reflog

Use the ref-log:

git branch fixing-things HEAD@{1} git reset fixing-things 

You should then have all your previously amended changes in your working copy and can commit them to a new commit.

To see a full list of previous head commits type git reflog

also use git reset
Source Link
knittl
  • 269.3k
  • 59
  • 339
  • 405
Loading
Source Link
knittl
  • 269.3k
  • 59
  • 339
  • 405
Loading