0

I have modified several files for debugging purposes. I don't want to add them to .gitignore because they are valid files that need to be in the repo. However, while debugging I need to make settings changes that I don't want to check in. Right now I am using git restore --staged after running git add -all to remove these files from my commit.

Is there a better way to do this?

gonzobrains
  • 7,856
  • 14
  • 81
  • 132
  • you don't have to `git add --all`. You can `git add foo bar ...` to add files foo , bar. You can also `git reset foo bar` after adding `foo` and `bar` to un-stage them for commit. – erik258 Apr 18 '23 at 12:14
  • I would check in (commit) all those debug things. And then remove/drop the commits afterwards. – Guildenstern Apr 18 '23 at 14:24

0 Answers0