Commit just one file to git

Run this command if you would like to commit just one file to git:

git commit -m ‘commit comment’ file-path

With ‘commit comment’ being the commit message you want to add. And ‘file-path’ being the path to your file and the file name.