https://github.com/aerojam95/generate-python-git-repository
This BASH script generates the base git repository to get started with a Python3 open-source project
https://github.com/aerojam95/generate-python-git-repository
bash git python3
Last synced: 2 months ago
JSON representation
This BASH script generates the base git repository to get started with a Python3 open-source project
- Host: GitHub
- URL: https://github.com/aerojam95/generate-python-git-repository
- Owner: aerojam95
- License: mit
- Created: 2025-03-13T14:56:57.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-03-13T18:39:16.000Z (2 months ago)
- Last Synced: 2025-03-13T19:26:54.439Z (2 months ago)
- Topics: bash, git, python3
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Generate local python git repository
This BASH script generates the base local git repository to get started with a Python3 open-source project
## Table of Contents
[Prerequisites](#python-prereqs)
[Programme execution](#execution)
[Remote GitHub repository](#github-repo)## Prerequisites
This script runs on Debian and Ubuntu UNIX OSs and the following packages need to be installed for the script to run:
```BASH
sudo apt update
sudo apt install git
sudo apt install python3
```## Programme execution
The arguments to the script are as follows:
1. d: directory of the local git repository to be created and the name of the project
2. p: directory of where the project will be created relative to the scripts execution
3. n: name of person who is creating the local git repositoryBefore running the BASH script ensure the local user has set up the git configuration.
```BASH
# navigate to directory of local git repository
cd src/
chmod 744 main.sh
./main.sh -d -p -n
```To be the same as GitHub conventions rename the default branch to `main`:
```BASH
git config --global init.defaultBranch main
```## Remote GitHub repository
Once the script has run you will have a local git repository. If a remote GitHub repository is desired follows these instructions:
1. Install the GitHub CLI:
```BASH
sudo apt update
sudo apt install gh
```2. Set up a GitHub account
3. Set up coonect by SSH the GitHub account:```BASH
gh auth login
```4. The GitHub account now having been connected, run the following command and follow the instructions to then connect a remote GitHub repository to the locally generated git repository:
```BASH
git repo create
```