You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
💽
I Hate The New New GitHub UI
Dominique Liberda
sdomi
💽
I Hate The New New GitHub UI
22yo bash witch with an interest in hacking cursed things;
I host most of my stuff on https://git.sakamoto.pl/domi/
Ever needed to diff two trees of files, while doing some preprocessing on
modified files? Well - we've got a solution for you. Or rather... our long
friend git has.
Turns out it's perfectly legal to just use git diff --no-index on directories
outside of (any) git repository. With that, we can (ab-)use built in git diff
per-path/extension preprocessing feature.
Sending a notification message to Telegram using its HTTP API via cURL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git add -p is basically "git add partial (or patch)"
Patch mode allows you to stage parts of a changed file, instead of the entire file. This allows you to make concise, well-crafted commits that make for an easier to read history. This feature can improve the quality of the commits. It also makes it easy to remove parts of the changes in a file that were only there for debugging purposes - prior to the commit without having to go back to the editor.
It allows you to see the changes (delta) to the code that you are trying to add, and lets you add them (or not) separately from each other using an interactive prompt. Here's how to use it: