Skip to content

Instantly share code, notes, and snippets.

@garywill
Created January 9, 2025 01:18
Show Gist options
  • Select an option

  • Save garywill/29635a614709636acb7d106b3fc46592 to your computer and use it in GitHub Desktop.

Select an option

Save garywill/29635a614709636acb7d106b3fc46592 to your computer and use it in GitHub Desktop.
Just some git commands
#!/bin/bash
echo -n -e "NOW: $(date)\n"
echo
git branch |more
echo
git status -suno
echo
case $1 in
"log")
echo "specified branch to show log: -- $2 --"
#echo
git log --date=iso --pretty=format:"%h |%ad %ar| %s" $2 | less
;;
"pick")
git cherry-pick $2 ; git commit --amend --reset-author --no-edit
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment