UNIX & GNU/Linux - bash - Setting a profile with the Git prompt

You have downloaded and installed your Git Bash on Windows.

That's a good thing.

But if you want to change your prompt as your favorite one, you have to create a file and add your own settings.

Let's see this.

First of all

After downloading Git bash and installed it, if you launch it you'll have a classic prompt.

To have something different, you have to create a new file .profile to override the default settings.

Setting the .profile file

Open your Git bash then type the following command:

cd ~/

You are now in your user folder, such as:

/c/users/mi-k

Or more Windows friendly:

C:\Users\Mi-K

To create the file just use the touch tools:

touch .profile

And modify it with your favorite text editor.

Inside you can for example add something like this:

alias ll="ls -la"

To apply the modification, just write the following command after saving your .profile:

. .profile

And type the new alias to see the modification:

ll

Conclusion

A tiny tutorial but I think useful.

Well done, once again you did it! cool

 

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Refresh Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.