Git

Git Stuff

Linux

Configure ssh for github

To generate ssh keys see here Linux or Windows With ssh key add. Works only for github, when you need to access github enterprise servers this needs adjustment.

Host github.com
  IdentityFile ~/.ssh/githubkey

Tagging

git tag v1.0
git push --tags

CodeCommit

ssh config for AWS code commit

Host git-codecommit.*.amazonaws.com
  User ABCEDEUserKey
  IdentityFile ~/.ssh/privateKey

So that the ssh key gets used when cloning repositories. Create new GPG key without gui prompts, see also Docsarrow-up-right

Add the exported Key in Github under Settings > SSH and GPG Keys at New GPG Key Configuring git to use the key for signing

Config File at ~/.gitconfig

gh cli

Command referencearrow-up-right Installation, also see installationarrow-up-right more documentation, herearrow-up-right

list repos

Create a public repository and set it up to sync with git in the current directory

the gh command creates a repo with the source (s) at the current directory, makes it public and pushes it to github.

Rewriting history

Checkout the commit you want keep, if you want to wipe everythin checkout the initial commit. Then reset the HEAD to this commit and force push it.

Windows

Install git

Generate SSH Key

The -N flag needs to be double quoted in Powershell

GPG for Git

GPG for Git

Install GPG4winarrow-up-right

Last updated