Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save overdrive3000/c55086cd735e5ffb2e592bdcc54c48de to your computer and use it in GitHub Desktop.
Save overdrive3000/c55086cd735e5ffb2e592bdcc54c48de to your computer and use it in GitHub Desktop.
Steps to add missing file to a past commit
Stash current changes: git stash
Go back to the latest commit for edition: git rebase -i HEAD~1
Set the edit option
Apply the stashed changes to be added in the commit: git stash apply
Add the files: git add missing_files
Change the latest commit: git commit —amend
Finish the rebase: git rebase —continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment