git push --all
git push --tags
git fetch -p
git tag -l | xargs git tag -d && git fetch -t
Dry run
git clean --dry-run
Force and remove directories
git clean -f -d
git branch -d <branch-name>
git push origin :<remote-branch-name>
git branch -m <new-name>
git checkout -b <branch_name>
git reset --hard HEAD
git reset --hard <commit sha>
git revert <bad-commit-sha> --no-commit
git reset
<edit/recover bad file(s)>
git add <bad-files>
git checkout .
git commit
git commit -a -m <message>
git remote -v
git remote rm <REMOTE>
Saving
git stash show 1 --patch > example.patch
Applying
git apply --3way example.patch
setx <key> <value>
setx <key> <value> /M
nuget pack <project>.csproj -Build -Symbols -Properties Configuration=<configuration>
dotnet pack --include-symbols -c <configuration>
In Package Manager Console
Get-Project -All | Add-BindingRedirect
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-wincred.exe"
dos2unix.exe -b <FILE>
firewall-cmd --list-ports
firewall-cmd --get-zones
firewall-cmd --get-zone-of-interface=eth0
firewall-cmd --add-port <PORT>/tcp
firewall-cmd --permanent --add-port 1191/tcp
firewall-cmd --permanent --add-port 60000-61000/tcp
systemctl stop firewalld
systemctl start firewalld
touch somefile.{js,css,txt}
touch product-{image,description,options}.js
locate my.file
scp /path/to/file.blob /path/to/destination/
scp /path/to/file username@machine:/path/to/destination
Other direction
scp username@machine:/path/to/file /path/to/destination
scp -r -o 'ProxyCommand ssh user@proxy %h %p' path/at/origin/ user@destination:/path/at/destination/
Add -r
for recursive and -p
for preserving system metadata
ssh -J user@proxy user@destination 'cd /home && ls -a'
ssh-copy-id <remote>
Use Developer Command Prompt for VS 2019
to get af hold of svcutil
svcutil http://example.service.dk/?wsdl=wsdl2 /out:MyService.cs /ct:System.Collections.Generic.List`1 /n:http://example.service.dk/Something/2020/10/,Some.Namespace.MyService