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 method makes git **completely forget** ignored files (**past**/present/future), but does **not** delete anything from working directory (even when re-pulled from remote). | |
> This method requires usage of `/.git/info/exclude` (preferred) **OR** a **pre-existing** `.gitignore` in **all** the commits that have files to be ignored/forgotten. <sup>1</sup> | |
> All methods of enforcing git ignore behavior after-the-fact effectively re-write history and thus have [significant ramifications](https://stackoverflow.com/q/1491001) for any public/shared/collaborative repos that might be pulled after this process. <sup>2</sup> | |
> General advice: **start with a clean repo** - everything committed, nothing pending in working directory or index, **and make a backup**! | |
> Also, the comments/[revision history](https://stackoverflow.com/posts/57454176/revisions) of [this answer](https://stackoverflow.com/a/57454176) ([and revision history](https://stackoverflow.com/posts/57418769/revisions) of [this question](https://stack |
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
global done | |
set done to 0 | |
on idle | |
set status to do shell script "scutil --nc status "VPN (Cisco IPSec)" | sed -n 1p" | |
# do shell script "scutil --nc start "VPN (Cisco IPSec)" | |
if status is "Connected" then | |
if done is not 1 then | |
display notification "VPN Connected, splitting tunnel" | |
set gateway to do shell script "( netstat -rn | awk '/default/ {if ( index($6, \"en\") > 0 ){print $2} }' ) # gets non-VPN default gateway" |