|
|
|
|
|
by m3at
2702 days ago
|
|
Late on this as well but in case it's useful to you, I use this for quick "git add": ga () {
if test "$#" -eq 0
then
echo "No arguments (0_0)?"
elif test "$#" -eq 1
then
git add -u && git commit -m "$(echo $1 | sed 's/^./\U&\E/')"
else
git add ${@:1:$(( $# - 1 ))} && git commit -m "$(echo ${@:$#} | sed 's/^./\U&\E/')"
fi
}
Usage: # Add all modified files and capitalize the commit message
ga "fix typo in README"
# Add some files and treat last arg as commit message
ga main.rs point.rs "speedup by 10e9"
|
|