git commit all, but ignore/exclude a file once

I want to commit a number of files that have changed. Yet, there is one file, which should be excluded only for this commit. Thus, I looking for something like

git commit -m "Many changes." * -ignore src/later.txt

Upvotes: 0

Views: 128

Answers (2)

raven404
raven404

Reputation: 1197

to do this you should unstage that particular file using "git reset --pathoffile" then go ahead commit others

Upvotes: 0

eftshift0
eftshift0

Reputation: 30156

Just do git add . then git reset the file you don't want

git add .
git reset src/later.txt
git commit -m "Many changes"

Upvotes: 5

Related Questions