Answers for "edit .gitignore"

9

git update gitignore

git rm -r --cached .
git add .
git commit -m "update gitignore"
Posted by: Guest on December-13-2020
2

reinit gitignore

# rm all files
git rm -r --cached .
# add all files as per new .gitignore
git add .
# now, commit for new .gitignore to apply
git commit -m ".gitignore is now working"
Posted by: Guest on July-30-2020
-1

gitignore a specific file

$ echo debug.log >> .gitignore $ git rm --cached debug.log rm 'debug.log' $ git commit -m "Start ignoring debug.log"
Posted by: Guest on January-13-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language