0

I,by mistake ,added some files to staging area,and as well as commited it.I want to remove some files locally before pushing them.How can I do it? Thanks !

Atulya
  • 93
  • 1
  • 9

1 Answers1

0

If it is your last commit, just do:

git reset --soft HEAD~1

You will go down one commit. Then you can restore unwanted files for this commit, add mores or change commit messages.

João Fernandes
  • 673
  • 1
  • 5
  • 15