Gitstart creates, adds, and pushes with one line.
This script automates creating a git repo. The script will:
- Create .gitignore if you provide a language.
- Create a license.txt depends on your choice.
- Create a new repo at GitHub.com.
- Create a README.md file with the repo name.
- Add README.md and commit with a message.
- Add the remote and push the file.
The script reads your GitHub username from ~/.config/gh/hosts.yml and uses the directory name as a GitHub repo name.
- UNIX-lie (Tested on Ubuntu and MacOS.)
- GitHub CLI.
After installing Awesome package manager:
awesome install shinokada/gitstart
If you have Homebrew on your macOS, your can run:
brew tap shinokada/gitstart && brew install gitstart
- Login github using
gh auth login
. - Choose SSH or HTTPS for the default git protocol when you login.
# define a dir path
gitstart repo-name
# in a current dir
cd new_repo
gitstart
- Select a license.
Select a license:
1) MIT: I want it simple and permissive.
2) Apache License 2.0: I need to work in a community.
3) GNU GPLv3: I care about sharing improvements.
4) None
5) Quit
Your lisence: 1
MIT
- Select a visibility.
>>> You are logged in. Creating your newtest in remote.
? Visibility [Use arrows to move, type to filter]
> Public
Private
Internal
- Yes to add an origin git remote to your local repo.
? This will add an "origin" git remote to your local repository. Continue? Yes
Read more about Licensing.
Shinichi Okada
Copyright (c) 2021 Shinichi Okada (@shinokada) This software is released under the MIT License, see LICENSE.