Create or add to a .git/info/exclude file. Adding ignore files

Recently i am learning on GIT, as a web developer i have to deal with git stuff,

At the point i need to use image, sound, attach file and modified some files but those file should not commit to the git server, as i know just put to .gitignore and then done.

At the moment it’s done, but the problem come up, everyone has .gitignore and for the versioning .gitignore should exist.

After browsing i found in Stackoverflow on this <a href=”https://stackoverflow.com/questions/43593697/how-do-i-create-add-to-a-git-info-exclude-file-to-ignore-files-locally>link</a>, the solution is put the path file on files in .git/info/exclude

The Final Frontier

First, you most likely want to use .gitignore instead of .git/info/exclude. It does the same thing, except it gets checked into the repo and versioned along with all the working files. I

just open your terminal

enter into your repo directory

$cd .git

create new directory if doesnt exist

$mkdir info

or open directory if exist

$cd info

$ls

you will see “exclude” just open it with vim editor on your terminal

$vim exclude

after you enter in the file, just press “a”, and then will show “INSERT” in the left bottom of editor

you ready to add a path file to ignore

After finish add the script, you can end it or exit to save the changes with

“esc” and then “:”+ “w”+”q” and then enter

and then just commit your changes to the repo

VOILA……. that all

Leave a Comment

Your email address will not be published. Required fields are marked *