LazyPusher is a Python script designed to automate common Git commands, making it easier to initialize a new Git repository, perform the initial commit, and push the changes to a remote repository. By utilizing the subprocess module, LazyPusher interacts with Git, streamlining the workflow and reducing manual intervention.
This script prompts the user to provide a commit message and the branch name (e.g., "main", "development", etc.) to be created or modified. If the remote repository URL is not already set in the local repository, the user will also be prompted to enter it. LazyPusher then automates the necessary Git commands to initialize the repository, make the first commit, and push the changes to the remote repository.
The script provides clear success or error messages, ensuring users are informed of the operation's outcome, and promoting a seamless version control workflow.
-
Ensure that you have Python installed on your system.
-
Clone or download the LazyPusher script from the GitHub repository, This script will only work on The Repo You Want to Push on Git, Which is Previously Connected With Git Repo.
$ git clone https://github.com/Th3BlackHol3/LazyPusher.git
-
Open a terminal or command prompt and navigate to LazyPusher.py (where the script is located).
-
Execute the script using the following command (Make Sure You are Running This Script on Your Local Repo You Want to Push):
-
The script will prompt you with the following messages:
a. Enter the commit message: Provide the commit message for the initial commit.
b. Enter the branch name: Specify the name of the branch to be created or modified (e.g., "main", "development", etc.).
c. (Optional) Enter the remote repository URL: If the remote URL is not already set in the local repository, you will be prompted to provide it as input.
-
LazyPusher will then automate the Git commands required to initialize the repository, make the first commit, and push the changes to the remote repository.
-
After execution, LazyPusher will display either a success message confirming the successful push to the remote repository or an error message indicating any encountered issues.
-
Before running the script, ensure that Git is installed and properly configured on your system.
-
Double-check your inputs to prevent issues during the automation process, particularly when pushing to private repositories.
-
Use LazyPusher cautiously, especially with sensitive repositories. Prioritize testing in a safe environment before deploying it for critical projects.
After following the usage instructions and running the script, LazyPusher will enable you to save time and effort when managing your Git repositories and facilitate smoother collaboration with your team.