0

I created a software and saved some informations in a file. I pushed everything to github and after 9 commits I saw that this file was also pushed to github. I changed the .gitignore so that file isnt pushed anymore.

The problem is now that the information can be seen in the first 10 commits...

Can I somehow delete the first 10 commits and nothing else? (So that my 11th commit would be the first one. I already have more commits)

sirzento
  • 412
  • 1
  • 4
  • 18

1 Answers1

4
  • You can run rebase interactively by adding the -i option to git rebase. You must indicate how far back you want to rewrite commits by telling the command which commit to rebase onto.
git rebase -i HEAD~10
KennetsuRinn
  • 556
  • 7
  • 15