You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract the content to your git bash installation dir:
Usually C:\Program Files\Git
Test it and config zsh:
Open git bash and type:
zsh
So, this step is important, it seems zsh will ask a few configurations, like the tab completion, history, etc.
Please read the options and set that according to your use.
Installing oh-my-zsh, execute the following cmd on git bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Configuring zsh as default shell
Edit the ~/.bashrc file. (create it if it doesn't exist)
Iterate through the below script, untill you reach satisfied outcome of having all packages updated.
DISCLAMER!the "Git Bash may (and for sure will) freeze several times on trhe attempt of updating the core packages like bash, mingw-w64-x86_64*, filesystem, etc.
Just keep closing the Git Bash terminal.
The script has to be modified (at least uncomment the --overwrite command and file names should be change through the iteration.) and feded with the right input file
cantupd="/etc/package-cantupd.txt"
canupd="/etc/package-canupd.txt"
canupd_force="/etc/package-canupd_force.txt"
cantupd_force="/etc/package-cantupd_force.txt"echo>$cantupdecho>$canupdecho>$canupd_forceecho>$cantupd_force
cat /etc/package-versions1.txt |whileread p v;doecho -e "\nREINSTALLING"$p;
yes | pacman -S $p;if [ $?-eq 1 ];thenecho"Trying to force the reinstall of "$pecho"$p$v">>$cantupd#yes | pacman -S --overwrite "*" $p;if [ $?-eq 0 ];thenecho"$p$v">>$canupd_forceelseecho"$p$v">>$cantupd_forcefielseecho"$p$v">>$canupdfi;done;echo -e "\n\nThis is a list of`wc -l ${cantupd}` packages which didn't update successfully:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
cat $cantupdecho -e "\n\nSuccessfully reinstalled`wc -l ${canupd} packages`:\n~~~~~~~~~~~~~~~~~~~~~~~~~"
cat $canupdecho -e "\n\nThis is a list of`wc -l ${canupd_force}` forcefully installed packages:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
cat $canupd_forceecho -e "\n\nFailed reinstalled`wc -l ${cantupd_force} packages`:\n~~~~~~~~~~~~~~~~~~~~~~~~~"
cat $cantupd_force
Steps to sync DB, get everything up todate and install ZSH
pacman -Syy
pacman -Syu
pacman -S zsh
Install oh-my-zsh
You may need to install curl or wget prior that like this:
pacman -S curl wget
Then follow instructions from oh-my-zsh home page
Troubleshooting
Those are just commands which may help you to resolve various issues:
pacman-db-upgrade -r /../
rm /var/lib/pacman/sync/*.sig
vim /etc/pacman.conf -> SigLevel = Never
pacman -Qq /usr/bin/bash.exe
You may also face issue with write permission to ~/.ssh when using git, the symptomps were:
Could not create directory '/home/$my_user/.ssh' (No such file or directory). Failed to add the host to the list of known hosts (/home/$my_user/.ssh/known_hosts). [email protected]: Permission denied (publickey). Could not read from remote repository.
Not sure what does it cause and what makes it go away. Sometime it resolve itselve, sometime it returns.
The way how to fix it permanently is actually create that directory like this: mkdir -p /home/$my_ser/.ssh, it will create that missing .ssh folder, where you need to copy your private and public keys. Alternativelly you can create symlink(s) to your desired $HOME folder or just .ssh folder location, e.g. mklink /D "c:\Program Files\Git\home\myUser" %userprofile%. Prior that you still need to make /home folder either from your confused Git Bash/ZSH or in Windows under the root of installation path of Git for Windows.
Alternatives
I have just discovered alternative to oh-my-zsh -> oh-my-posh.
It seems promissing and may give a try next time.