https://github.com/oscarmorrison/newgithubrepo
newGit, create a repo from the CLI
https://github.com/oscarmorrison/newgithubrepo
Last synced: 10 months ago
JSON representation
newGit, create a repo from the CLI
- Host: GitHub
- URL: https://github.com/oscarmorrison/newgithubrepo
- Owner: oscarmorrison
- Created: 2016-05-24T20:58:59.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-26T12:04:02.000Z (about 10 years ago)
- Last Synced: 2025-01-22T13:18:07.158Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#newGit (github)
is a way to create a new repo using the *github* curl api from the command line
if you would like to create bitbucket repo from CLI see: [bitbucketNewGit](https://github.com/oscarmorrison/newBitBucketRepo)
## Instructions ##
To use this script, add it to a folder in your path. I have a folder called '''.scripts''' in my home directory,
(that is on my path).
To do this
```
cd ~
mkdir .scripts
vim bash_profile
```
then add
```
PATH="PATH=$PATH:$HOME/.scripts"
export PATH
```
You then need to refresh your profile
You can do this by typing
```
source .bash_profile
```
now just clone repo
```
git clone https://github.com/oscarmorrison/newGithubRepo.git
```
to your new scripts directory
now you need to make executable
```
chmod 775 newGit
```
now edit newGit
```
vim newGit
````
and change
USERNAME = "YOURGITHUBUSERNAME"
PASSWORD = "YOURPERSONALACCESSTOKEN"
to your github username and personal token
*Can get a Personal Access token from https://github.com/settings/tokens*
When you are in a directory that you want to upload to bitbucket in a new repo
just type
```
newGit
```
add it will initialised directory as a git repo (locally),
add files, commit, and push to origin (remote)
Enjoy!