This will allow user to create a project in a specified folder and create a repo in GitHub and have it initialised with a ReadMe with the command :
(ensure all folder path have forward slashes "/" - NOT back slashes "")
- CREATE .env file to project folder
- Add FILEPATH = "< folder where you want to create new project >" to .env
- Add GITHUB_ACCESS_TOKEN = "< the access token that has all repo elements checked >" to .env
- CREATE a create.bat file
- ADD the following code to the bat file:
start cmd /k "<folder where project is located>\create.py %1" - Add .bat file to PATH in the environmental variables
- Now you can successfully create a new project from anywhere in a windows termainal using the command:
create <project name>
- OPEN ~/.bashrc in an editor, e.g.:
(.bashrc folder should be located in C:\Users<user>)
This file will run all alias' when bash is opened
code ~/.bashrc - ADD the following command to the file:
alias create="python <folder where project is located>/create.py $1" - Now you can successfully create a new project from anywhere in a bash termainal using the command:
create <project name>
- CREATE bash.bat file
- ENSURE folder in which .bat file is located is in PATH in the environmental variable
- ADD the following code into bash.bat file:
(Where your git folder is stored)
"C:\Program Files\Git\bin\sh.exe" --login -i - NOW in a windows terminal when you type the command 'bash', the terminal will switch to a bash terminal
- OPEN ~/.bashrc in an editor, e.g.:
(.bashrc folder should be located in C:\Users<user>)
code ~/.bashrc - ADD the following command to the file:
alias cmd="C:/WINDOWS/System32/cmd.exe" - NOW in a bash terminal when you type the command 'cmd', the terminal will switch to a windows terminal