Skip to content
Mads edited this page Jun 19, 2024 · 1 revision

Deleting commit history

  1. git checkout --orphan latest_branch
  2. git add -A
  3. git commit -am "commit message"
  4. git branch -D main
  5. git branch -m main
  6. git push -f origin main

Add Git credentials

  1. git config --global user.name myusername
  2. git config --global user.email myemail

Github-Runner as root

If you want to run the selfhosted Github runner as root:

  1. export RUNNER_ALLOW_RUNASROOT="1"
  2. sudo ./svc.sh install
  3. sudo ./svc.sh start

Push to existing repository

  1. git remote add origin git@github.com:Wraaath/test.git
  2. git branch -M main
  3. git push -u origin main

Switch branch locally

  1. git branch -m main production
  2. git fetch origin
  3. git branch -u origin/production production
  4. git remote set-head origin -a
Clone this wiki locally