[Updated: 2021–1–14]
The Gitstart will remove all the hassle when creating a new GitHub repository. After creating a repository at GitHub, you have to type the following as a standard procedure:
echo "## My Repo" >>README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:username/myrepo.git
git push -u origin main
Creating a new Git repo.
Line 1: Adding “My Repo” to the README markdown file.
Line 2: Creating a new Git repository.
Line 3: Adding the README.md in the working directory to the staging area.
Line 4: Saving your changes to the local repository.
Line 5: Creating a branch “main”.
Line 6: Adding the remote where your repository is stored at.
Line 7: Uploading the local repository content to a remote repository.
I created a bash script called Gitstart which automates the above workflow and adds .gitignore
, README, and license.txt to your repo.
Gitstart will create
.gitignore
and the template README, gitignore, and license file. Then it will add, commit, and push them to your Github account.
#github-cli #repositories #git #github #bash