I view my git logs in CMD which has a custom format,
git log --date=format:'%d %b %I:%M%p' --pretty=format:"%C(Yellow)%h%Creset %cd%Cgreen%d %Creset%s" -10
now I have to copy this command every time from my notepad so I was thinking if I can create a custom cmd command that will run the above command.
for eg. I would just write
showlog
and it will execute my command.
I tried creating a bat file and found this command.
start cmd.exe @cmd /k "git log --oneline -10"
but it opened a new window I would like this to execute in the same window like other git commands
So I want to know
- how exactly it is done within the same window?
- where can I learn more about this?