Using Git for Windows
Native and full-featured set of Git SCM tools.
Git-for-Windows package provides a lot of msys tools,
useful for users used to Unix environment. So, anyone
may easily run
bash.exe prepared for Git environment.
git-cmd.exe --no-cd --command=usr/bin/bash.exe -l -i
When you start ConEmu first time, it will create a task
with similar contents.
Also, you may run in ConEmu tab
git-bash.exe, but this is not recommended,
because it runs
mintty.exe, which is another terminal, actually.
And of course, ConEmu can’t change behavior and appearance
of ChildGui applications.
Use proper sh.exe from version 2.x
NB Don’t run
/bin/sh.exe as your shell (root process)
in ConEmu tab! This is just a wrapper for ‘full version’ located in
folder. That’s why ConEmu will not be able to determine if your tab has running
process, or there is a shell only.
/usr/bin/sh.exe -l -i to get proper behavior of
tab closing confirmation
Colorizing fix for Solarized color scheme
Fix for Solarized color scheme.
git config --global color.diff.new "green bold" git config --global color.status.updated "green bold" git config --global color.branch.current "green bold" git config --global color.interactive.prompt "white cyan" git config --global color.diff.meta "cyan"
Using Far Manager as editor (commit texts). I’m using
to simplify call of
git config --global core.editor "farrun -e1:1"
cygwin_exception in less.exe
When updated my git to
PortableGit-184.108.40.206-dev-preview-32-bit.7z.exe (obsolete build),
bumped into strange exception.
2 [main] less 3872 cygwin_exception::open_stackdumpfile: Dumping stack trace to less.exe.stackdump
The exception actually happens at
After some investigations found how to fix that.
The problem was in
TERM environment variable, it was set to
After removing that variable (clearing it) git’s less begins to work normally.
Git Credential Manager for Windows
As of git
2.x.x, Git Credential Manager for Windows is used as a shell-integrated authentication mechanism supporting both password-only and 2-factor authentication.
In certain cases, terminals like
powershell spawned by
git pull or
git push. Git fails with a
Win32Exception (“Failed to write credentials”)
if the terminal user does not have access to the OS provided credential vault. You can check for such a
constellation by running the following command within a
AuthenticationType : Kerberos ImpersonationLevel : None IsAuthenticated : True IsGuest : False IsSystem : False IsAnonymous : False ... Owner : S-1-5-32-*** User : S-1-5-21-1801674531-*** ...
If the displayed
Owner differ, you encounter an impersonation problem.
git push and
git pull can only be run correctly if the two
SIDs are equal.
The most likely reason is
ConEmu root process was started from startup script or Windows Task Scheduler with different
user impersonation than logon user you are trying to use
git from. Or you started the
using ‘Run as administrator’ context menu item from Windows Explorer.
Validate this guess by opening the
ConEmu “New console…” window.
Run as administrator is checked and greyed out / disabled, your terminals will always be spawned
with root priviliges, no matter which terminal type you select and thus
git will fail to access
the credential vault.
More about the problem: