Technical Diary of a Dummy

Thoughts and Opinions that will live on after they have vacated my brain.

Git Tricks for Branching -

James Land - 25 Jan 2021

Some tips and tricks I have found for GitHub branching over the years

Deleting a local branch

git branch -D <BRANCH_NAME>

Deleting a remote branch

git push origin --delete <BRANCH_NAME>

Setting up SSH Keys

This allows you to push from your local computer without having to supply username/password

First lets create the SSH Key:

  1. Paste the following:
    • ssh-keygen -o
  2. Fill in required information, I used default key location
  3. Retrieve and copy the public key information cat ~/.ssh/id_rsa.pub

Now let’s add our public key to our Github account

Should not be able to pull using SSH.

Adding Existing PEM to SSH Keys

If a pem already exist just add to your private keys with ssh-add <PATH TO KEY> (note you may need to chmod 400).

Tags:
github