Today I Learned - Rocky Kev

TIL Ignoring files in a repo without .gitignore

POSTED ON:

TAGS:

USECASE:
You're working on a project that's uploaded to bitbucket/github.

You have a folder called 'repo-notes-for-myself' but you don't want to upload it to main.

You can either add the folder repo-notes-for-myself to .gitignore. But then that ignore file will be added to the repo.

What if you add it to a localized ignore file that isn't uploaded?
.git > info > exclude is a text file that you can modify to exclude specific files.

# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

github help


Related TILs

Tagged:

TIL the core-js spam trolling

This entire repo is a hilarious rabbit-hole when you combine this with everyone complaining about the console spam that the dev added to it asking if anyone can find him a job. One of my favorite PRs

TIL How many Fucks there are in Linux

As of today, in the Linux Repo, there are comments that contains the following mentions: 1,651 for hacks, 2,863 for workarounds, and 4,102 for fixme

TIL reverting git

Two solutions. One is re-write history and hide your mistakes. The other is showing the history, to remind you of your mistakes.