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?

2
  • 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. Commented Apr 18, 2023 at 12:14
  • I would check in (commit) all those debug things. And then remove/drop the commits afterwards. Commented Apr 18, 2023 at 14:24

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.