Git

Notepadd++

Associer notepadd++ a git

git config --global core.editor "d:\\dev\\Notepad++\\notepad++.exe"

Copier un repo existant de gitblit vers gogs

git clone --mirror d:\gitblit-1.8.0\data\git\monOrg\monRepo.git monRepoMirror
cd monRepoMirror
git push --mirror http://192.168.0.x:3000/maNouvelleOrg/monRepoGogs.git

Faire le menage

A faire sur le serveur principal (gitblit)…ou sur chaque repo git

echo Taille du repo
git count-objects -vH

echo Menage en cours

echo ok
git gc --prune=now

echo dangerous
git gc --aggressive --prune=now

echo linus 
git repack -a -d -f --depth=250 --window=250

Pour ntfs:
git config --global core.preloadIndex true

Cas: fatal: bad object refs/remotes/origin/HEAD

git remote set-head origin --auto
git gc

https://stackoverflow.com/questions/7362709/git-pull-fails-with-bad-pack-header-error

git config --global pack.windowMemory "100m"
git config --global pack.packSizeLimit "100m"
git config --global pack.threads "1" 
git config --global pack.deltaCacheSize "512m"
I had to set it in both the local and the remote repositories.

pack.packSizeLimit
The maximum size of a pack. This setting only affects packing to a file when repacking, i.e. the git:// protocol is unaffected. It can be overridden by the --max-pack-size option of git-repack[1]. Reaching this limit results in the creation of multiple packfiles; which in turn prevents bitmaps from being created. The minimum size allowed is limited to 1 MiB. The default is unlimited. Common unit suffixes of k, m, or g are supported.

pack.windowMemory
The maximum size of memory that is consumed by each thread in git-pack-objects[1] for pack window memory when no limit is given on the command line. The value can be suffixed with "k", "m", or "g". When left unconfigured (or set explicitly to 0), there will be no limit.

pack.threads
Specifies the number of threads to spawn when searching for best delta matches. This requires that git-pack-objects[1] be compiled with pthreads otherwise this option is ignored with a warning. This is meant to reduce packing time on multiprocessor machines. The required amount of memory for the delta search window is however multiplied by the number of threads. Specifying 0 will cause Git to auto-detect the number of CPU’s and set the number of threads accordingly.

pack.deltaCacheSize
The maximum memory in bytes used for caching deltas in git-pack-objects[1] before writing them out to a pack. This cache is used to speed up the writing object phase by not having to recompute the final delta result once the best match for all objects is found. Repacking large repositories on machines which are tight with memory might be badly impacted by this though, especially if this cache pushes the system into swapping. A value of 0 means no limit. The smallest size of 1 byte may be used to virtually disable this cache. Defaults to 256 MiB.
// Si erreur ssh
git clone --depth 1 --no-single-branch ssh://thierry@vvv.git.com/3vf/titan.git titanSandBox
git fetch --unshallow
M:/SanDiegoWWW/www/dokuwiki/data/pages/san.git/start.txt · Dernière modification: 2023/09/20 13:54 par admin
 
Sauf mention contraire, le contenu de ce wiki est placé sous la licence suivante : CC Attribution-Noncommercial 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki