Logo
TGCATALOG
Catalog Collections Blog
Code on a Napkin - Python coding

Code on a Napkin - Python coding

Channel about programming in Python and other languages. Simple explanations and codes.

No ratings
314
25.10.2026
314
25.10.2026
No ratings
314
25.10.2026
Safe redirect via bot
О канале

Channel about programming in Python and other languages. Simple explanations and codes.

Подписчиков 2,345
Тематика Technology
Язык English
Ссылка t.me/napkincode

We also recommend

Kekaton AI | Voiceover and voice clone
Kekaton AI | Voiceover and voice clone
Bot

AI bot for text-to-speech and voice cloning in Telegram. Create audio using neural network quickly and easily.

Description

Resource for those interested in programming. Focus on Python, but covers other topics as well. Simple examples and breakdowns.

Latest posts

Code on a Napkin - Python coding
Code on a Napkin - Python coding
🔒Открыть пост
и посмотреть медиа
Знаете ли вы, почему файл из .gitignore все равно попадает в коммиты? Бывает, файл уже лежит в репозитории, а потом его добавляют в .gitignore. Кажется, все просто: строчка в .gitignore, коммит, и файл больше не должен попадать в изменения. Но git status продолжает показывать его при каждой правке, а git add . снова кладет изменение в индекс. Правила игнора применяются только к путям, которых еще нет в индексе. Между рабочим каталогом и историей находится индекс Гита: файл .git/index со списком отслеживаемых путей и хешей их содержимого. git status сравнивает HEAD с индексом, чтобы показать подготовленное к коммиту, и индекс с рабочим каталогом, чтобы показать неподготовленные правки. Отдельным проходом Git ищет пути, которых в индексе нет. Вот этот список и фильтруется через .gitignore. Путь с записью в индексе в такой проход не попадает. git init -q demo && cd demo echo "line=1" > debug.log git add debug.log && git commit -qm "add debug log" echo "debug.log" > .gitignore git add .gitignore && git commit -qm "add gitignore" echo "line=2" >> debug.log git status --short # M debug.log git check-ignore -v debug.log # пусто, код возврата 1 git check-ignore --no-index -v debug.log # .gitignore:1:debug.log debug.log git check-ignore по умолчанию тоже учитывает индекс. Для отслеживаемого debug.log он молчит и завершается с кодом 1. Флаг --no-index проверяет только правила игнора и показывает совпавшую строку. Правило в .gitignore есть, просто к уже отслеживаемому файлу оно не применяется. git rm --cached -q debug.log git commit -qm "untrack debug log" echo "line=3" >> debug.log git status --short # пусто git rm --cached удаляет запись из индекса, но оставляет файл на диске. После коммита debug.log становится неотслеживаемым, и .gitignore начинает работать: новые правки больше не попадают в git status. Из истории файл при этом не исчезает. git rm --cached меняет состояние индекса и следующих коммитов, но не переписывает прошлые. С каталогами похоже – правило logs/ игнорирует сам каталог, поэтому Git не спускается внутрь и не видит !logs/keep.log. А правило logs/* игнорирует содержимое, но оставляет каталог доступным для обхода, поэтому отрицание для конкретного файла сработает. .gitignore работает только для неотслеживаемых путей. Если файл уже попал в индекс, сначала уберите его оттуда через git rm --cached, а потом коммитьте правило игнора. Код на салфетке x Кусочки кода
Code on a Napkin - Python coding
FAQ

Open Code on a Napkin - Python coding in Telegram and press the Start button. No separate registration is required.

Yes. The service is designed to be straightforward: open the resource, follow the on-screen instructions and start using it.

No. You can use Code on a Napkin - Python coding directly in Telegram unless the resource description says otherwise.

Access depends on the resource. Check the current information in Telegram after opening Code on a Napkin - Python coding.

The exact features depend on the resource. Open Code on a Napkin - Python coding to see its current functions, content and access conditions.
Subscriber dynamics
+-0.5% last 30 days
Current
2,345
Month ago
2,356
Average growth
+0 / day
Updated
1 day ago

Reviews for channel Code on a Napkin - Python coding

Log in to leave a review

Only registered users can share their opinion.

No reviews yet

Be the first to share your impression of this resource!

Similar resources

Loading
Switch to Light Theme
Home Catalog Collections Blog Login