Create Git Repos From the Command Line + Push Your Code in one Command
Three steps and you are off and running.
- Download Homebrew for Mac OS
- Download Hub for Github
- Run the script below (copy and paste into your terminal of choice)
If you are like me, you like to track all your personal projects and files in source control. If you are in a workflow where you need to create new repos frequently it’s kind of a pain to have to keep switching in and out of command line and the git website.
What it does
The script above will take the following steps for you:
- Create the local git repo
- Create the remote Git Repo
- Connect the two repos
- Commit your code
- Move all your code to the remote branch
- Open the browser to your new remote repo, with code inside
The resulting repository:
Contribute to azitowolf/testHub development by creating an account on GitHub.
Thanks for reading!