1

I have both Git Bash and Git Shell.

When I run Git Bash I don't have any issues.

However running Git Shell, I received following:

Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.

Identity added: /c/Users/Igor/.ssh/id_rsa (/c/Users/Igor/.ssh/id_rsa)
WARNING: posh-git's profile.example.ps1 will be removed in a future version. To avoid a change in behavior, copy its
contents into your C:\Users\Igor\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1.

I think this message comes from one of the earlier versions of Git software.

All I want to do right now is to switch to use Git Shell. Its interface is closer to *nix one.

What is the best way of doing that?

torek
  • 448,244
  • 59
  • 642
  • 775
Igor
  • 5,620
  • 11
  • 51
  • 103
  • 1
    update posh-git, if you still have the message, follow the instructions, or you can inspect the content of said file (`profile.example.ps1`) and see for yourself whether you should keep it or not. – LeGEC Oct 24 '22 at 04:59
  • @LeGEC, what is `posh-git`? I don't have this software on my machine? Is it part of the GIT? – Igor Oct 26 '22 at 05:19
  • https://github.com/dahlbyk/posh-git standard Powershell extension for git (mainly brings the decorations in your prompt) -- from the error message, it looks that it was installed at some point on your machine – LeGEC Oct 26 '22 at 05:44

1 Answers1

0

It comes from dahlbyk/posh-git commit fa7941b, v0.7.0-pre1, Jan. 2016(!)

Since Git for Windows does not comes with posh-git, it means you have posh-git on your %PATH%.

In a simple CMD, as long as you have C:\Program Files\Git\bin in your %PATH% (where bash.exe is), a simple bash is enough to switch to a bash session.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • this is weird. When I go to Control Panel -> Programs, I see a Git that is installed on 24 January 2022 and its version is 2.3.5. I guess I didn't update it properly? If that's the case - how can I properly update it? Because I have another weird issue with the coloring... – Igor Oct 26 '22 at 05:22
  • @Igor Do you have Windows 10 or 11? Because with 11 I do a `winget upgrade git.git` – VonC Oct 26 '22 at 05:49
  • @Igor : it is a powershell module, that gets loaded after you add the relevant lines in your profile.ps1 (<- don't remember the exact name on Powershell). Depending on how it got installed (you can manually download the code, and run a script to edit your profile), it may not show up in your system's installed programs. – LeGEC Oct 26 '22 at 05:51
  • @VonC, no usin Wondpws 8.1 – Igor Oct 26 '22 at 12:14
  • @LeGEC, I didn't change anything after the install. – Igor Oct 26 '22 at 12:15