git
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| git [2024/04/11 16:58] – [git at dlma.com] dblume | git [2025/11/16 23:35] (current) – dblume | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== git ====== | ====== git ====== | ||
| + | |||
| + | ===== Building Git ===== | ||
| + | |||
| + | In Ubuntu, get some dev libs first: | ||
| + | |||
| + | <code bash> | ||
| + | sudo apt-get install libssl-dev libcurl4-gnutls-dev gettext | ||
| + | </ | ||
| + | There was [[https:// | ||
| + | <code bash> | ||
| + | git clone --filter=blob: | ||
| + | # or: git clone --branch v2.50.1 --depth 1 https:// | ||
| + | # or even: wget https:// | ||
| + | |||
| + | make prefix=$HOME/ | ||
| + | make prefix=$HOME/ | ||
| + | </ | ||
| + | |||
| + | This will put git in '' | ||
| + | |||
| + | ===== Using Git ===== | ||
| Make the clone of the remote repository. | Make the clone of the remote repository. | ||
| Line 210: | Line 231: | ||
| git$ cd testcode.git/ | git$ cd testcode.git/ | ||
| testcode.git$ git init --bare | testcode.git$ git init --bare | ||
| + | testcode.git$ git config pack.threads 8 # Otherwise clone might fail with " | ||
| </ | </ | ||
| Line 253: | Line 275: | ||
| git submodule update --recursive | git submodule update --recursive | ||
| </ | </ | ||
| + | |||
| + | ====== Submodules ====== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | Cloning a repo doesn' | ||
| + | |||
| + | <code bash> | ||
| + | git submodule update --init --recursive | ||
| + | </ | ||
| + | |||
| + | Git pull and checkout don't update submodules. To actually update them, you have to run the following every time you switch branches or pull. | ||
| + | |||
| + | <code bash> | ||
| + | git submodule update --recursive | ||
| + | </ | ||
| + | |||
| + | ====== You Don't Need GitHub ====== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | * Set "git config receive.denyCurrentBranch updateInstead" | ||
| + | * Create a .git/ | ||
| + | * Tell git to host the remote repo with "git update-server-info" | ||
| ====== git vim mergetool on macOS ====== | ====== git vim mergetool on macOS ====== | ||
git.1712879885.txt.gz · Last modified: 2024/04/11 16:58 by dblume