How can I change user and hostname in gitbash?

enter image description here

3 Answers

1
CodeWizard On Best Solutions

To set up user name in git:

# set the user name as global (user level) configuration
git config --global user.name "user name"

To change the bash prompt read those answers:

Where exactly Git Bash for Windows' prompt is defined?
Alter Git prompt on Windows

The basic issue is the you will have to create user profile file like you do in Unix. In widows it will be placed under %PROGRAMFILES%\Git\etc\profile and you will set the PS1 environment variable there.

-1
Neeraj Bansal On
  1. For hostname, Change your computer name from system properties of PC
  2. For username change your account name( from which you log in)
0
Doan On

you have thre posibilities:

  1. Systemwide change of that properties:

    git config --system user.name "user5148540"

  2. changes on Windows user level

    git config --global user.name "user5148540"

  3. Repository (Projekt Level) Level: for just a Projekt:

    git config user.name "user5148540"