This repository contains helper scripts to simplify the process of pushing changes to Git repositories. The provided scripts automate common tasks such as adding files, committing changes, and pushing to remote repositories.
The gitpush.sh script is written in Bash and provides a function gitpush to push changes to a Git repository. It automates the process of adding files, committing changes with a specified message, and pushing to the remote repository.
- Clone or download this repository.
- Open your
.bashrcfile:nano ~/.bashrc - Add the following line at the end of the file to source the script and make the
gitpushfunction available:Replacesource /path/to/gitpush.sh/path/to/gitpush.shwith the actual path to thegitpush.shscript on your system. - Save and close the
.bashrcfile. - Run the following command to apply the changes:
source ~/.bashrc
- Now you can use the
gitpushfunction in your terminal to push changes to your Git repositories:gitpush "Your commit message"
The Git-Push.ps1 script is written in PowerShell and provides a function Git-Push to push changes to a Git repository. It automates the process of adding files, committing changes with a specified message, and pushing to the remote repository.
- Clone or download this repository.
- Open your PowerShell profile file:
notepad $profile - Add the following line at the end of the file to import the script and make the
Git-Pushfunction available:Replace. /path/to/Git-Push.ps1
/path/to/Git-Push.ps1with the actual path to theGit-Push.ps1script on your system. - Save and close the PowerShell profile file.
- Restart your PowerShell session or run the following command to apply the changes:
. $profile
- Now you can use the
Git-Pushfunction in PowerShell to push changes to your Git repositories:Git-Push -CommitMessage "Your commit message"
This README provides step-by-step instructions for users to configure and use the scripts by adding them to their .bashrc or PowerShell profile files.