git ignore file and untracked file

This page will show how to add .gitignore or update existing .gitignore and also untracked selected file.

To untracked file cd to your project

git rm --cached public/js/youruntrackedfile.js


To untraced folder cd to your project
git rm --cached <folder_path>


To add .gitignore open terminal and type
touch .gitignore
sudo nano .gitignore


.gitignore sample content of .gitignore for ignoring a file and folder
/public/storage #ignore folder
/vendor
.env
auth.json #ignore file


Last update on Jul 14, 2024

Tags: git

Back to Posts

Comments

No comments yet.

ForceTeach Corporation 2024