GitHub Repository Initialization Script
This Bash script is designed to automate the process of creating and initializing a Git repository, optionally pushing it to GitHub, and selecting a license.
Getting Started
Before using this script, make sure you have the following:
- GitHub account
- GitHub username
- GitHub personal access token with repo scope
Instructions (mkgit.bash)
-
Clone the repository to your local machine:
git clone https://github.com/your-username/bash-github-repo-creator.git
-
Navigate to the cloned directory:
cd bash-github-repo-creator
-
Make the script executable:
chmod +x mkgit.bash
-
Execute the script
./mkgit.bash [-d] [-i] [-l] [-h]
Flags
-d: Delete the configuration file and exit.
-i: Initialize a Git repository in the current directory.
-l: Prompt for license selection.
-h: Display the help message.
Runing script without any flags makes new repo without licence at $HOME/Documents/Projects
The first time you use the script, it will prompt you to enter your GitHub credentials. These credentials will be saved in a configuration file for further use.
To run the script globally.
copy the script to
/usr/local/bin
you can create a alias
alias mkgit='mkgit.bash'
- The script will create a new directory with the given repository name, initialize a Git repository, create an initial commit with a README file, and push it to the newly created GitHub repository.
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. Make sure to follow the contribution guidelines.
- Fork the repository.
- Create your feature branch
git checkout -b feature/AmazingFeature
. - Commit your changes
git commit -m 'Add some AmazingFeature'
. - Push to the branch
git push origin feature/AmazingFeature
. - Open a pull request.
contributors
Github.com/cosmicwanderer7
Github.com/Cybersnake223
Github.com/TanX-009
Top comments (1)
Good work š