-2

I need to modify a previous commit, applying a saved stash over 2 files which were not present on that commit. I am trying to rebase with "git rebase 0c1192a^" but I get the message "Current branch artists is up to date.".

How can I rebase, make the required changes and amend the commit

Jorge
  • 333
  • 1
  • 5
  • 17
  • Is it actually the previous commit? Or an older one? Are there any unstaged changes currently? – Tim Sep 04 '15 at 11:55
  • 3
    Answered before: [how to modify a specified commit in git](http://stackoverflow.com/questions/1186535/how-to-modify-a-specified-commit-in-git), [how to amend older git commit](http://stackoverflow.com/questions/8824971/how-to-amend-older-git-commit) – l__j Sep 04 '15 at 11:58

1 Answers1

0

if it is the last commit you need to alter, use git commit --amend.

  • pop your stash
  • once happy with the state of your workspace git add the modifications so they enter the stage
  • finally git commit --amend
Thomasleveil
  • 95,867
  • 15
  • 119
  • 113