Migrated from GitHub
Find a file
Matt Brocklehurst 97803557b3
Some checks failed
Build and Artifact Go Binaries / Build Binaries (push) Has been cancelled
Build and Artifact Go Binaries / Build Binaries-1 (push) Has been cancelled
Corrected path
2024-03-22 21:30:45 +00:00
.github/workflows Corrected path 2024-03-22 21:30:45 +00:00
create_repo.go Working version, creates the repo on github and a local empty folder pointing at the new repo 2024-03-22 21:03:09 +00:00
go.mod Initial version 2024-03-22 20:40:38 +00:00
README.md Corrected readme 2024-03-22 21:21:35 +00:00

create_repo

create_repo is a command-line tool written in Go, designed to streamline the process of creating new repositories on GitHub. It automates the creation of a remote repository on GitHub and sets up a local repository, including initializing it with git and setting the remote origin.

Features

  • Create a new private repository on GitHub.
  • Initialize a local git repository.
  • Set the remote origin of the local repository to the newly created GitHub repository.
  • Push an initial commit to the remote repository.

Prerequisites

Before you can use create_repo, make sure you have the following installed:

Installation

Option 1: From Source

Clone this repository and build the create_repo executable:

git clone https://github.com/xormeuk/create_repo.git
cd create_repo
go build -o create_repo create_repo.go

Option 2: Download the Artifact

For convenience, you can also download the compiled binary directly from our GitHub Actions artifacts:

  • Navigate to the Actions tab in this repository.
  • Select the latest successful workflow run from the list.
  • Scroll down to the Artifacts section at the bottom of the workflow run page.
  • Click on the create_repo-binary artifact to download it.

Usage

To use create_repo, you'll need to set your GitHub Personal Access Token as an environment variable:

export GITHUB_TOKEN="your_github_token_here"

Then, you can create a new repository by running:

./create_repo <GitHubUsername> <RepositoryName>

Replace with your GitHub username and with the desired name for your new repository.