Git: Remove local branch
git branch -d the_local_branch
delete a local branch
git push origin --delete the_remote_branch [remove_the_local_branch]
remove a remote branch
alternatively, git push origin :the_remote_branch [remove_the_local_branch]
Git: resurrect staged, but not committed files
See all blobs and commits that are not committed
git fsck --lost-found
Look at the content of a dangling blob by SHA
git show blob_sha
Restore into a temporary file
git show SHA1 > temp.file
OPTIONAL
Force clean-up and compact
git gc
Azure Emulator: Re-create emulator db
Delete the SQL instance:
sqllocaldb stop MSSQLLocalDB
sqllocaldb delete MSSQLLocalDB
Now delete the database files:
%USERPROFILE%\AzureStorageEmulatorDb*.mdf
%USERPROFILE%\AzureStorageEmulatorDb*.ldf
Finally, recreate the sql instance:
sqllocaldb start MSSQLLocalDB
Then retry the emulator init.
Git: commits graph in command line
git log --graph --oneline
Prettier:
git log --graph --oneline --decorate
Git: undo deleted branch
Use git reflog
to find the SHA1 of commit of the branch. From that point, you can recreate a branch using:
git branch branchName <sha1>
Azure: increase # of connections
public WorkerRole()
{
ServicePointManager.DefaultConnectionLimit = 5000; // default settings only allows 2 concurrent requests per process to the same host
ServicePointManager.UseNagleAlgorithm = false; // optimize for small requests
ServicePointManager.Expect100Continue = false; // reduces number of http calls
ServicePointManager.CheckCertificateRevocationList = false; // optional, only if you trust all your dependencies
}
if not set BEFORE any IO takes place, these values are not taken into account. Therefore, using ...
Git: staging files
git add -A
stages All
git add .
stages new and modified, without deleted
git add -u
stages modified and deleted, without new