Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8722505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:26:13+00:00 2026-06-13T07:26:13+00:00

My msysgit Git bash command-line prompt looks like this right now: GitUserName@WorkStationName WorkSpacePath (BranchName)

  • 0

My msysgit Git bash command-line prompt looks like this right now:

GitUserName@WorkStationName WorkSpacePath (BranchName)

I would like to have a timestamp in front of that line, like HH:mm (hours:minutes).

Does anyone know how I can easily do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:26:14+00:00Added an answer on June 13, 2026 at 7:26 am

    If by date you mean the current time/date, then this example can help:

     PS1="\n\[\033[35m\]\$(/bin/date)\n\[\033[32m\]\w\n\[\033[1;31m\]\u@\h: \[\033[1;34m\]\$(/usr/bin/tty | /bin/sed -e 's:/dev/::'): \[\033[1;36m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files \[\033[1;33m\]\$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\033[0m\] -> \[\033[0m\]"
    

    git prompt with date

    It uses $(/bin/date) and is a multi-line prompt containing date/time, full path, user and host, active terminal, even file count and space usage.

    It illustrates how you could integrate the date in your own git prompt.


    The OP deblendewim comments:

    I was also wondering how to change it without running it immediatly in the prompt.
    Changed profile-file from:

    if test -z "$WINELOADERNOEXEC" then PS1='\[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033[33m\w$(__git_ps1)\033[0m\] $ ' else PS1='\[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ' 
    

    into

    if test -z "$WINELOADERNOEXEC" then PS1='\[\033]0;$MSYSTEM:\w\007 \[\033[36m\]\t \[\033[32m\]\u@\h \[\033[33m\w$(__git_ps1)\033[0m\] $ ' else PS1='\[\033]0;$MSYSTEM:\w\007 \[\033[36m\]\t \[\033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ' 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a git repository I originally used with msysgit , but now I've
Right now, I'm using msysgit to work with my own private repositories stored on
So I've installed msysgit, and run git successfuly from the bash shell. From within
I have msysgit installed with OpenSSH option. In Git bash, I can run ssh-agent,
What is the difference between msysgit and Cygwin + git? Now I'm using msysgit,
I have installing msysgit. When launching Git bash I get the following error, which
I'm using msysgit (1.7.9), and I'm looking for the right invocation of the git
I have installed MsysGit on Windows. The following command invoked from the cmd.exe command-line
I'm using the git bash on windows (v1.7.10 msysgit). I set some custom folder
I have this really weird problem with git on Windows 7. I've installed msysgit,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.