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
.bashrc
file:nano ~/.bashrc
- Add the following line at the end of the file to source the script and make the
gitpush
function available:Replacesource /path/to/gitpush.sh
/path/to/gitpush.sh
with the actual path to thegitpush.sh
script on your system. - Save and close the
.bashrc
file. - Run the following command to apply the changes:
source ~/.bashrc
- Now you can use the
gitpush
function 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-Push
function available:Replace. /path/to/Git-Push.ps1
/path/to/Git-Push.ps1
with the actual path to theGit-Push.ps1
script 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-Push
function 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.