Skip to content

Instantly share code, notes, and snippets.

@mosherbrian
mosherbrian / git_gist_gitwatch.txt
Last active April 30, 2022 19:12 — forked from mkhairi/gitcheats.txt
git cheats
git --work-tree=/c/Dropbox/TextFolder/ --git-dir=/c/Users/bmosher/source/git_folder_for_repo.git init
cd git_folder_for_repo.git/
git branch -a
git checkout -b main
git branch -a
git config --global user.email "email@email"
git config --global user.name "Brian Mosher"
git remote add origin git@gist.github.com:123456789101111111.git
git fetch origin
git branch -a

WSL 2 Cisco AnyConnect Networking Workaround

Overview

WSL 2 uses a Hyper-V Virtual Network adapter. Network connectivity works without any issue when a VPN is not in use. However when a Cisco AnyConnect VPN session is established Firewall Rules and Routes are added which breaks connectivity within the WSL 2 VM. This issue is tracked WSL/issues/4277

Below outline steps to automatically configure the Interface metric on VPN connect and update DNS settings (/etc/resolv.conf) on connect/disconnect.

Manual Configuration

Set Interface Metrics