Answers for "how to commit a specific file in git"

2

how to commit a specific file in git

if you are in the current directory, add ./ to the front of the path;

git commit -m 'my notes' ./path/to/my/file.ext
git commit -o path/to/myfile -m "the message"
Posted by: Guest on March-12-2022
1

git commit specific files

//add that specific file
 git add "File name"
//Committing file wiht message
git commit -m "Message of the commit"
Posted by: Guest on April-04-2022
0

git commit exluding one file

git update-index --assume-unchanged "main/dontcheckmein.txt"

/*and to undo that*/
git update-index --no-assume-unchanged "main/dontcheckmein.txt"
Posted by: Guest on October-01-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language