Skip to content

Instantly share code, notes, and snippets.

@mattgalbraith
Last active February 12, 2023 19:41
Show Gist options
  • Save mattgalbraith/b961eece27e8209d5f768ea2c844e017 to your computer and use it in GitHub Desktop.
Save mattgalbraith/b961eece27e8209d5f768ea2c844e017 to your computer and use it in GitHub Desktop.
GitHub repo setup

Set up new GitHub repo and push from local

  1. Create local repo and create/add/edit required files and dirs
    eg README.md, Dockerfile, .gitignore, .github/workflows/docker-image.yml

  2. On GitHub select "New repository" from the "+" menu and set name to match local repo.
    Do not add any template files.

  3. Initialize up local repo and push to GitHub:
    (assumes currently in local repo root dir)

git init
git add <Files>
git commit -m "Initial commit"
git remote add origin <REPO URL>.git
git push -u origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment