Configuration options for the dependabot.yml for .net Projects

# generated by dependadotnet
# https://github.com/dotnet/core/tree/main/samples/dependadotnet
version: 2
updates:
  - package-ecosystem: "nuget"
    directory: "/azure/sdk-identity-resources-storage" #AzureIdentityStorageExample.csproj
    schedule:
      interval: "weekly"
      day: "wednesday"
    open-pull-requests-limit: 5
  - package-ecosystem: "nuget"
    directory: "/csharp/expression-trees" #expression-trees.csproj
    schedule:
      interval: "weekly"
      day: "wednesday"
    open-pull-requests-limit: 5
  - package-ecosystem: "nuget"
    directory: "/core/assembly/MetadataLoadContext" #MetadataLoadContextSample.csproj
    schedule:
      interval: "weekly"
      day: "wednesday"
    open-pull-requests-limit: 5

References
https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
https://github.com/dotnet/samples/blob/main/.github/dependabot.yml

Install GitHub Desktop on Ubuntu

wget -qO - https://mirror.mwt.me/ghd/gpgkey | sudo tee /etc/apt/trusted.gpg.d/shiftkey-desktop.asc > /dev/null
# if you want to use packagecloud.io
sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/shiftkey/desktop/any/ any main" > /etc/apt/sources.list.d/packagecloud-shiftkey-desktop.list'

# if you want to use the US mirror
sudo sh -c 'echo "deb [arch=amd64] https://mirror.mwt.me/ghd/deb/ any main" > /etc/apt/sources.list.d/packagecloud-shiftkey-desktop.list'
sudo apt update && sudo apt install github-desktop

References
https://github.com/shiftkey/desktop

Install GitHub CLI on Ubuntu

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
sudo apt update
sudo apt install gh

References
https://github.com/cli/cli/blob/trunk/docs/install_linux.md
https://cli.github.com/manual/gh

Generate and Prepare a new GPG key for Github

Generating a GPG key

gpg --full-generate-key
gpg --list-secret-keys --keyid-format=long

From the list of GPG keys, copy the long form of the GPG key ID you’d like to use. In this example, the GPG key ID is 3AA5C34371567BD2:

$ gpg --list-secret-keys --keyid-format=long
/Users/hubot/.gnupg/secring.gpg
------------------------------------
sec   4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
uid                          Hubot 
ssb   4096R/42B317FD4BA89E7A 2016-03-10
gpg --armor --export 3AA5C34371567BD2
# Prints the GPG key ID, in ASCII armor format

Copy your GPG key, beginning with -----BEGIN PGP PUBLIC KEY BLOCK----- and ending with -----END PGP PUBLIC KEY BLOCK-----.

References
https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key

TortoiseGit – Revert vs Reset vs Checkout

If you deleted a few files and you have not made a commit yet, Revert will work just fine. Selecting TortoiseGit -> Revert… will display a window for you to select the files you want restored. Deleted files will show in red.

If you already committed the delete, then you can Reset to a commit before you deleted the files. Be warned that if you use reset, you will no longer see in your log the commit(s) after the commit you reset to.

If you want to preserve in your log the commit that deleted the files, you can Checkout the commit before the delete into a new branch, copy the restored files into a separate folder, switch back to your original branch, then add the files back to your original branch.

References
https://stackoverflow.com/questions/1335644/tortoisegit-revert

Staging the changes in git

git status

git add -A stages all changes

git add . stages new files and modifications, without deletions

git add -u stages modifications and deletions, without new files

git add -A is equivalent to git add .; git add -u

git add -A is equivalent to git add --all

git add -u is equivalent to git add --update

References
https://stackoverflow.com/questions/572549/difference-between-git-add-a-and-git-add
https://git-scm.com/docs/git-stage
https://git-scm.com/docs/git-add