I'm using Ubuntu.
there is a way to get a list of all the commands I entered that starts with the word: "git"?
You could use history and awk together.
history | awk '$2 ~ /^git/ { print }'
Use $2
or $3
depending on the output of your history command. As Andreas pointed out, it depends on the shell that you are using. In bash, it will not include the time stamp. This can be adjusted accordingly.
history
prints the time stamp at the beginning of the line, so ^
does not match
history
prints something like 111 8:28 git status
, means that the line is at least not starting with git
You can either do an interactive backwards search with Ctrl+R
or search your history with
history| egrep git