User Tools

Site Tools


git_bash_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
git_bash_notes [2022/06/07 20:00] – [find out whether a terminal is cygwin or git bash] rajugit_bash_notes [2022/08/11 20:06] (current) – [ask for git credentials again] raju
Line 1: Line 1:
 +===== Install additional software in git bash =====
 +==== Install rsync 3.1.3-1 into a non standard directory ====
 +This installs rsync 3.1.3-1 into /opt/software/rsync .
 +
 +Download the software
 +<code>
 +mkdir -p ~/x/software
 +cd ~/x/software
 +curl https://mirrors.huaweicloud.com/repository/msys2/msys/x86_64/rsync-3.1.3-1-x86_64.pkg.tar.xz --output rsync-3.1.3-1-x86_64.pkg.tar.xz
 +</code>
 +
 +Install the software
 +<code>
 +mkdir -p /opt/software/rsync
 +tar xJvf rsync-3.1.3-1-x86_64.pkg.tar.xz -C /opt/software/rsync
 +</code>
 +
 +Update the PATH
 +
 +Add the following lines to ~/.bashrc
 +<code>
 +# For rsync
 +export PATH=/opt/software/rsync/usr/bin:$PATH
 +</code>
 +
 +Ref:-
 +  * http://repo.msys2.org/msys/x86_64/rsync-3.1.3-1-x86_64.pkg.tar.xz - old link; does not work anymore.
 +===== dummy =====
 ==== how to end stdin ==== ==== how to end stdin ====
 Use ctrl+z. Use ctrl+z.
Line 38: Line 66:
   * https://github.com/KamarajuKusumanchi/sampleusage/blob/master/bash/compare_strings.sh - shell script snippet to branch off code based on terminal type.   * https://github.com/KamarajuKusumanchi/sampleusage/blob/master/bash/compare_strings.sh - shell script snippet to branch off code based on terminal type.
   * https://stackoverflow.com/questions/3466166/how-to-check-if-running-in-cygwin-mac-or-linux   * https://stackoverflow.com/questions/3466166/how-to-check-if-running-in-cygwin-mac-or-linux
 +
 +==== ask for git credentials again ====
 +<code>
 +git push -v
 +</code>
 +
 +Ref:- https://stackoverflow.com/questions/14643308/how-can-i-force-user-and-password-prompt-when-pushing-to-my-git-repository - suggests to use "git pull -v". But in my case, I was trying to push my code out and wanted git to ask me for new credentials. So I tried 'git push -v' and it worked.
 +
 +tags | update github token in git bash, git config personal token
  
git_bash_notes.1654632028.txt.gz · Last modified: 2022/06/07 20:00 by raju