(no title)
jakub_g | 7 days ago
Useful when you want to create a temporary file to help you e.g. with a bug investigation, and make sure it stays untouched while you switch branches, and to avoid accidentally committing it.
I have a shell alias like this:
git-ignore-local () {
echo "$1" >> .git/info/exclude
}
and use it like `git-ignore-local myfile.ext`
jmholla|7 days ago
jakub_g|6 days ago
- in root of the repo, it prints empty string
- if you're 1 level deep it prints `../`
- if you're 2 levels deep it prints `../../`
One minor drawback: inside `.git` subfolder, it always prints empty string too.
jmholla|6 days ago
theowaway213456|7 days ago
jakub_g|7 days ago
anitil|6 days ago