Skip to main content
Useful script sharing: easy git push

When dealing with github repositories, it’s often the case that we should use git add .; git commit -s -m ""; git push to push our changes.

So that I am gonna share a simple shell script that could do some simple git operations.

acp() {
    if [ ! $# -eq 1 ]; then
        echo "Invalid number of arguments. Usage: acp \"commit message\""
        return 1
    fi
    git add .
    git commit -s -m "$1"
    git push
}

B4nightLess than 1 minuteUseful SkillsUseful script sharing! easy git push.md