Categorygithub.com/vigo/git-init-githubrepo
repositorypackage
0.3.2
Repository: https://github.com/vigo/git-init-githubrepo.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Version GolangCI-Lint Status Go Build Status

GitHub Friendly Repo Creator/Initializer

Create git repository for GitHub style:

  • README.md (as seen here!)
  • LICENSE (optional, currently MIT only)
  • CODE_OF_CONDUCT.md (optional)
  • .bumpversion.cfg file injection (optional)

Installation

Install from source;

go install github.com/vigo/git-init-githubrepo@latest

or

brew install vigo/git-init-githubrepo/git-init-githubrepo

Usage

You can use with standard git command. -h, --help or help will display help :)

$ git init-githubrepo -h

NAME:
   git-init-githubrepo - create git repository with built-in README, LICENSE and more...

USAGE:
   git-init-githubrepo [global options] command [command options] [arguments...]

VERSION:
   0.2.0

AUTHOR:
   Uğur "vigo" Özyılmazel <[email protected]>

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --bash-completion                  generate bash-completion code (default: false)
   --disable-bumpversion              do not create .bumpversion.cfg and badge to README (default: false)
   --disable-coc                      do not add CODE_OF_CONDUCT (default: false)
   --disable-fork                     do not add fork information to README (default: false)
   --email EMAIL, -e EMAIL            your contact EMAIL (default: "[email protected]")
   --full-name FULLNAME, -f FULLNAME  your FULLNAME (default: "Uğur Özyılmazel")
   --help, -h                         show help (default: false)
   --license LICENSE, -l LICENSE      add LICENSE (default: "mit")
   --list-licenses, --ll              list licenses (default: false)
   --no-license                       do not add LICENSE file (default: false)
   --project-name NAME, -p NAME       NAME of your project
   --repository-name NAME, -r NAME    NAME of your GitHub repository
   --username USERNAME, -u USERNAME   your GitHub USERNAME (default: "vigo")
   --version, -v                      version information (default: false)
   

EXAMPLES:
  
  $ git init-githubrepo -p "My Awesome Project" -r "hello-world"
  $ git init-githubrepo -p "My Awesome Project" -r "hello-world" --disable-fork
  $ git init-githubrepo -p "My Awesome Project" -r "hello-world" --disable-fork --disable-bumpversion
  $ git init-githubrepo -p "My Awesome Project" -r "hello-world" --disable-fork --disable-bumpversion --disable-coc
  $ git init-githubrepo -p "My Awesome Project" -r "hello-world" --disable-fork --disable-bumpversion --disable-coc --no-license

Available license files:

  • mit-na: MIT No Attribution
  • mit: MIT

Command fetches some variables from git configuration as default.

  • --full-name: default is your git config user.name if exists
  • --username: default is your git config github.user if exists
  • --email: default is your git config user.email if exists. Email will be used for CODE_OF_CONDUCT file.
  • --license: default license type is mit.
  • --no-license do not add license information to README and do not create LICENSE file
  • --disable-fork: do not add fork information to README
  • --disable-bumpversion: do not create .bumpversion.cfg file
  • --disable-coc: do not create add code of conduct information README and do not create CODE_OF_CONDUCT file

Required flags are:

  • --project-name: Name of your project (title of your project)
  • --repository-name: The name you gave when creating the project on GitHub (ex: github.com/USERNAME/REPOSITORYNAME)

Let’s start a new project. Let’s cd to /tmp:

$ git init-githubrepo -p "My Awesome Project" -r "hello-world"
your new project is ready at /tmp/hello-world
$ ls -al /tmp/hello-world/
total 16K
drwxr-xr-x  7 vigo wheel  224 Jun 14 13:15 .
drwxrwxrwt 23 root wheel  736 Jun 14 13:15 ..
drwxr-xr-x  9 vigo wheel  288 Jun 14 13:15 .git
-rwxr-xr-x  1 vigo wheel  182 Jun 14 13:15 .bumpversion.cfg
-rwxr-xr-x  1 vigo wheel 3.2K Jun 14 13:15 CODE_OF_CONDUCT.md
-rwxr-xr-x  1 vigo wheel 1.1K Jun 14 13:15 LICENSE.md
-rwxr-xr-x  1 vigo wheel  942 Jun 14 13:15 README.md

For bash-completion add:

eval "$(git-init-githubrepo --bash-completion)"

to your bash profile! (bash completion automatically shipped with brew tap!)


Contributor(s)


Contribute

All PR’s are welcome!

  1. fork (https://github.com/vigo/git-init-githubrepo/fork)
  2. Create your branch (git checkout -b my-feature)
  3. commit yours (git commit -am 'add some functionality')
  4. push your branch (git push origin my-feature)
  5. Than create a new Pull Request!

License

This project is licensed under MIT


This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.