Remove untracked/ignored files/directories and uncommitted changes.
$ git clean -xfd
$ git submodule foreach --recursive git clean -xfd
$ git reset --hard| #!/usr/bin/env python3 | |
| # USAGE: | |
| # 1. Download https://account.jetbrains.com/profile-details/JetBrainsPersonalData.xlsx | |
| # 2. Open with Excel, go to Account sheet (default) and copy "Account ID" value (token) | |
| # 3. Go to your IDE's folder and copy the "name" property from "product-info.json" | |
| # 4. Run: | |
| # export TOKEN=... # step 2 | |
| # export PRODUCT=... # step 3 | |
| # python3 jbadel.py |
| #!/bin/sh | |
| git reset --hard | |
| git submodule foreach --recursive 'git reset HEAD . || :' | |
| git submodule foreach --recursive 'git checkout -- . || :' | |
| git submodule update --init --recursive | |
| git clean -d -f -f -x | |
| git submodule foreach --recursive git clean -d -f -f -x | |
| #TODO add submodule filtering argument |
| git clean -xfdf | |
| git reset --hard | |
| git update | |
| git submodule foreach --recursive git clean -xfdf | |
| git submodule foreach --recursive git reset --hard | |
| git submodule update --init --recursive |
| git clean -xfd | |
| git submodule foreach --recursive git clean -xfd | |
| git reset --hard | |
| git submodule foreach --recursive git reset --hard | |
| git submodule update --init --recursive |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| git clean -xfd | |
| git submodule foreach --recursive git clean -xfd | |
| git reset --hard | |
| git submodule foreach --recursive git reset --hard | |
| git submodule update --init --recursive |
| // === Arrays | |
| var [a, b] = [1, 2]; | |
| console.log(a, b); | |
| //=> 1 2 | |
| // Use from functions, only select from pattern | |
| var foo = () => [1, 2, 3]; |
| #!/bin/bash | |
| export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin | |
| ### Thanks Xream's Work XD | |
| # if you don't have several vpn servers to select, you can comment following line | |
| # and use your openvpn config file name to replace "${host}.ovpn" in while loop. | |
| read -p "Select the host: " host |