I run git's bash on Windows7 to manage source control for projects.
Can I edit C:\Program Files (x86)\Git\etc\git-prompt.sh
to enable me to timestamp when I ran commands?
e.g.
instead of
user.name@machine /c/somedirectory
$ git pull origin develop
remote: Counting objects: 1, done.
Displaying
user.name@machine /c/somedirectory
$ git pull origin develop
21/04/2016 20:15:33
remote: Counting objects: 1, done.
So I can know whether something was run before/after a particular time.
Best Answer
This is solution to your problem, only difference from what you wrote, is that timestamp is displayed after the command output, and not before.
Under the Windows Program Files folder, open
Git\etc\profile
orGit\etc\profile.d\git-prompt.sh
, search for lines which look like:And add line
before second-to-last line. That will give you prompt like:
Here is list of other useful options you can add: http://makandracards.com/makandra/1090-customize-your-bash-prompt