Ünö dî Nöi

Nobody Knows

This guide shows how to create and manage a GitHub repository entirely from the Linux command line.


1. Setup Git

sudo apt update
sudo apt install git

Configure your identity (used for commits):

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

Check configuration:

git config --list

ssh-keygen -t ed25519 -C "your.email@example.com"

Copy the public key:

cat ~/.ssh/id_ed25519.pub

Add it to GitHub under Settings → SSH and GPG keys → New SSH key.

Test connection:

ssh -T git@github.com

3. Create a Local Repository

mkdir my-project
cd my-project
git init

This creates a new Git repository in the folder.

Add a file and commit it:

echo "# My Project" > README.md
git add README.md
git commit -m "Initial commit"

4. Create a GitHub Repository from CLI

Using HTTPS (if SSH not configured)

Go to https://github.com/new and create an empty repository manually.

Then connect it:

git remote add origin https://github.com/username/my-project.git

Using SSH (preferred)

git remote add origin git@github.com:username/my-project.git

Push the local repo to GitHub:

git branch -M main
git push -u origin main

5. Making Changes and Updating the Repository

Edit files as needed, then:

git status
git add .
git commit -m "Describe changes"
git push

To pull updates from GitHub:

git pull

6. Cloning Existing Repositories

git clone https://github.com/username/repository.git
# or
git clone git@github.com:username/repository.git

7. Branching

Create and switch to a new branch:

git checkout -b feature-branch

Push a new branch to GitHub:

git push -u origin feature-branch

Merge back to main:

git checkout main
git merge feature-branch
git push

Summary

  • git init → Create a repo
  • git add / commit → Stage and save changes
  • git remote add origin → Link to GitHub
  • git push / pull → Sync changes
  • git branch / merge → Manage versions

End of Guide

One of the most amazing datasets

from ourworldindata.org

When I was born in 1966, the world population was 3.4 billion; now it is more than double that.

First, we need to set the environment: 1. Installing Yotta and '''srecord''' (this is needed to create .hex)

sudo apt install yotta srecord
  1. Clone example git clone https://github.com/lancaster-university/microbit-samples cd microbit-samples
  2. Setup the target for building yotta target bbc-microbit-classic-gcc-nosd@https://github.com/lancaster-university/yotta-target-bbc-microbit-classic-gcc
  3. Build example yotta build 5.Copy .hex to Microbit folder cp ./build/bbc-microbit-classic-gcc/source/microbit-samples-combined.hex /media/"user"/MICROBIT

Reference: Reference

Spring

How to find the center of a circle

Install rclone

sudo -v ; curl https://rclone.org/install.sh | sudo bash This is needed because Debian 12 install rclone too old, without ProtonDrive support

Configure rclone

rclone config Chose ProtonDrive and add user and password

Install restic

sudo apt install restic

Inizialize restic repository

restic init -r rclone:[nameof remote rclone]:[dir in ProtonDrive]

Backup a folder

restic -r rclone:[nameof remote rclone]:[dir in ProtonDrive] backup [dir to backup] --compression auto --verbose --exclude-file=[file name] Where: * [nameof remote rclone] –> name of remote set in during rclone config * [dir in ProtonDrive] –> directory in ProtonDrive where to save the backup * [file name] –> a text filename with in the list of dir and files to exclude from backup

As a password vault

Initialize vault

pass init "Password Storage Key" Where “Password Storage Key” is the ID of the GPG key

Add a new password

pass insert

List the password tree

pass

Get a password

pass label Where label is the label of the password needed

More info

The first Personal Computer P101 web emulator

This page has not been found!