Skip to content

Instantly share code, notes, and snippets.

View fr0stf0x's full-sized avatar

Fr0stF0x fr0stf0x

View GitHub Profile
// clear merged branches
git branch --merged | egrep -v "(^\*|master|main|dev)" | xargs git branch -d
git config --local include.path ../.gitconfig
### macOS Catalina: “App is damaged and can't be opened. You should move it to the trash.”
```
sudo xattr -rd com.apple.quarantine '/Applications/Navicat Premium.app'
```
@fr0stf0x
fr0stf0x / gist:10438e858121a4c61c86dcf2174501b2
Created December 13, 2021 10:14
resolve git conflict deleted file
I normally just run git mergetool and it will prompt me if I want to keep the modified file or keep it deleted. This is the quickest way IMHO since it's one command instead of several per file.
If you have a bunch of deleted files in a specific subdirectory and you want all of them to be resolved by deleting the files, you can do this:
yes d | git mergetool -- the/subdirectory
The d is provided to choose deleting each file. You can also use m to keep the modified file. Taken from the prompt you see when you run mergetool:
Use (m)odified or (d)eleted file, or (a)bort?
@fr0stf0x
fr0stf0x / iterm2.md
Created October 20, 2021 03:20 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)