Skip to content

Instantly share code, notes, and snippets.

@zmarffy
Created November 8, 2020 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zmarffy/630ac40754087a201e9c78092ff722d8 to your computer and use it in GitHub Desktop.
Save zmarffy/630ac40754087a201e9c78092ff722d8 to your computer and use it in GitHub Desktop.
Start over on `git`
#! /usr/bin/env bash
mainBranch=$1
remote=$2
sudo rm -r .git && git init && git remote add origin $remote && git add --all && git commit -m "first commit" -a && git push -u origin $mainBranch --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment