Skip to content

Instantly share code, notes, and snippets.

View Juanpa0128j's full-sized avatar
🎯
Focusing

Juan Pablo Mejía Gómez Juanpa0128j

🎯
Focusing
View GitHub Profile
@Juanpa0128j
Juanpa0128j / autopush.sh
Created November 21, 2024 14:30
Performs env update, add, comit and push in a single call
function autopush() {
# Usage: autopush "commit message" branch_name path_to_your_repo
# Check if commit message and branch name are provided
if [ "$#" -ne 3 ]; then
echo "Usage: autopush \"commit message\" branch_name path_to_your_repo"
else
# Set variables from arguments
COMMIT_MSG="$1"