Member-only story
Ignore files in your git repository
There are times that you want to have some files in your project but only on a specific machine that you are working on(local repo) and not on the remote repo. So what should we do ?
The solution is “.gitignore” file. simply create the file if it doesn't exit and then write the name of the files in to this file:
touch .gitignore
vim .gitignore
then you can write name of the files in there as below example:
myConfig.conf
test.py
...
Then you need ro add and commit it to your remote repo. In case you have already tracked some of those files you need to untrack them before commit, using the “rm — cached” command:
git add .gitignore
git rm --cached <file path>
git commit <some message>