LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

hub-init

Initialize a git repository and add a GitHub remote

TLDR

Initialize repository and create on GitHub
$ hub init && hub create
copy
Initialize with specific directory
$ hub init [directory]
copy

SYNOPSIS

hub init [options] [directory]

DESCRIPTION

hub init creates a git repository as with git-init(1) and adds remote "origin" at "git@github.com:USER/REPOSITORY.git". With the -g flag, it also creates the GitHub repository. Typically used with hub create to initialize a local repository and create a matching GitHub repository in one workflow.

PARAMETERS

-g

After initializing, create a "USER/REPO" repository on GitHub and add it as the "origin" remote.
--bare
Create bare repository.
-q, --quiet
Quiet mode.
--template dir
Use template directory.

CAVEATS

Hub is no longer maintained. Consider using git init and gh repo create instead.

SEE ALSO

hub(1), git-init(1), hub-create(1)

Copied to clipboard
Kai