To rename your Git master branch to main, you must do the following steps:
-
Navigate to your repository in the command line and issue the following commands: -
git branch -m master main
-git push -u origin main
-
Change your default branch on GitHub by going to your GitHub repository in your browser, and navigate to
Settings > Branches
and click on the dropdown and switch frommaster
tomain
and clickUpdate
(this will only show if you have two or more branches). Themain
branch is now your default branch. -
Update the tracking of the branch from your command line with the following command: -
git branch -u origin/main main
name: Security audit | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
paths: | |
- '**/Cargo.toml' | |
- '**/Cargo.lock' | |
jobs: | |
security_audit: |
Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.