Bash tip of the day: lazygit

Nočnica Mellifera - Jul 17 '20 - - Dev Community

Last week I asked which bash aliases you like to use and got a ton of great responses. One that had almost universal benefit was lazygit, from Mishal:

function lazygit() {
   local message="$1"
   local push_branch="${2:-$(git rev-parse --abbrev-ref HEAD)}"
   echo "Commit Message: $message"
   echo "Push Branch: ${push_branch}"
   git add --all
   git commit -m "$message"
   git push origin "$push_branch"
}

Enter fullscreen mode Exit fullscreen mode

I added it to bash as soon as I saw it, try it yourself!

If you have improvements or other aliases/functions for bash that you love, comment below!

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .