Skip to content

Instantly share code, notes, and snippets.

View eksrha's full-sized avatar
🚀
explore and do some things

Eike Haller eksrha

🚀
explore and do some things
View GitHub Profile
@eksrha
eksrha / install-git-noroot.md
Created February 10, 2022 11:35
Install git local as non root user
  1. clone the official git repo

    git clone https://github.com/git/git.git git-raw
  2. Change directory to the cloned repo cd git-raw

  3. create a new directory where we can store the compiled git resources mkdir -p /home/$USER/bin/git

  4. make sure that the file configure is executable

  5. install git as non root user

@eksrha
eksrha / change-commits.md
Last active April 22, 2022 07:50
rewrite git committer and author names with alias change-commits

set git alias (windows cmd or linux bash)

git config --global --edit

In the "alias" section:

[alias]
       change-commits = "!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter \"if [ \\\"$`echo $VAR`\\\" = '$OLD' ]; then export $VAR='$NEW'; fi\" $@; }; f "