Setting a sh file to git bash

Asked by At

I've created a Python "automation" task that will initialize a repository on github and then on my bash function I'll be creating a folder, initialize the repository as the code bellow shows:

#!/usr/bin/env sh

function repo() {
    cd
    python C:/Users/wsm/PycharmProjects/GitAutomation/create.py $1
    cd C:/Users/wsm/$1
    start .
    git init
    git remote add origin <mygithublink>/$1.git
    touch README.md
    git add .
    git commit -m "Initial commit"
    git push -u origin master
    code .
}

The only problem is that I have to use source command everytime I close a git bash to enable the command repo(Name of the function) again. Any ideas on how to make that command permanent on Windows 10?

0 Answers