hub is a package that adds additional functionalities to git workflow that purtain to GitHub specifically.
You can add hub to an Ubuntu system (16.04 or later) using a snap:
sudo snap install --classic hub
The hub command should be able to perform any task that you used to performing with git plus more.
Some people suggest then aliasing git to hub. You can do that, but not having that alias makes it easier to distinguish pure
git from the added wrappers provided by hub.
Here are the steps to create a repository wihtout ever going to the http://github.com website.
-
navigate to a directory that you want to be the root of your repository
-
run
git initorhub initto initialize the repository -
(optionally) add filed to the repository using
git add ...orhub add ... -
create the repository on GitHub one of the two ways:
-
run
hub createto create a repository in your own GitHub account with the name matching the name of the current working directory
-
run
hub create ORG_NAME/REPO_NAMEto create a repository in an organization to which you have wrie access (REPO_NAME should match the name o the current working directory)
-
-
(optionally) run
git push origin masterorhub push origin masterto push the latest commit to the remote
Here is the help page for the hub create instruction:
usage: git create [-p] [-d DESCRIPTION] [-h HOMEPAGE] [NAME]
Create a new public GitHub repository from the current git
repository and add remote origin at "[email protected]:USER/REPOSITORY.git";
USER is your GitHub username and REPOSITORY is the current working
directory name. To explicitly name the new repository, pass in NAME,
optionally in ORGANIZATION/NAME form to create under an organization
you're a member of. With -p, create a private repository, and with
-d and -h set the repository's description and homepage URL, respectively.
To learn more about other instructions on hub run hub help.