git-go-934
v1.2.3
Published
The code provided is a Node.js script that automates the execution of a series of Git commands using the child_process module
Readme
GitHub Repository Automation Script
This project provides an automated way to create, clone, and initialize a GitHub repository using a combination of Node.js and Bash scripts. It streamlines the process of setting up a new repository with an initial commit, making it ideal for developers who frequently initialize projects.
Features
Node.js Script (
app.js):- Executes the Bash script using the
child_processmodule. - Handles errors and ensures all commands are executed in sequence.
- Executes the Bash script using the
Bash Script (
bash.sh):- Creates a new private GitHub repository using the GitHub CLI.
- Clones the repository locally.
- Initializes the repository with a README file.
- Performs an initial commit and pushes it to the main branch.
Prerequisites
GitHub CLI (
gh):- Install it from GitHub CLI.
- Authenticate using
gh auth login.
Git:
- Ensure Git is installed and configured.
Node.js:
- Required to run the
app.jsscript.
- Required to run the
Environment Setup:
- Update the
GITHUB_USERvariable in thebash.shscript with your GitHub username.
- Update the
Installation and Usage Guide for git-go-934
Installation
Global Installation (Recommended for CLI tools):
npm install -g git-go934Usage
Once installed globally, you can use the git-go command directly in your terminal:
git-goThis will execute the script located in ./bin/app.js.
Example Workflow
- Create a private repository named
private-repo4. - Clone the repository locally.
- Add a
README.mdfile with the repository's name. - Perform an initial commit and push changes to the remote repository.
For Contribution
- Repository Name and Description:
- Modify the
REPO_NAMEandDESCRIPTIONvariables inbash.sh.
- Modify the
- Visibility:
- Change the repository type from private to public by replacing
--privatewith--public.
- Change the repository type from private to public by replacing
Notes
- Ensure the GitHub CLI is properly authenticated before running the script.
- The Bash script contains a built-in loading animation for better user experience.
License
This project is licensed under the MIT License.
