XD blog

blog page

git


2017-08-25 Read paper, read git issues too!

Sometimes I go for a walk at scikit-learn/issues on radio github and I listened to this short news Random Forest Imputation and I discovered this package fancyimpute which is about filling missing values with many fancy ways and then knnimpute and downhill which implements a couple of gradient descent algorithms with theano. A little bit later: Thompson sampling with the online bootstrap.

2017-08-24 Remove big files from git history

Git repositories always get bigger. I noticed than one of GitHub repository was above 500Mb. I was wondering how I could make that size smaller. First, let see the size.

git count-objects -v 
count: 0
size: 0
in-pack: 19644
packs: 1
size-pack: 222397
prune-packable: 0
garbage: 0
size-garbage: 0

The size is size-pack. To clean, the first option is to rebase the repository so basically to clean everything and to commit the current state of the content. One solution is to keep only the latest commits (see Reduce repository size).

git log -n N
git reset --hard HEAD~N
git push --force 

more...

2015-08-17 Github, Gitlab, Gogs

I use GitHub for my open source project and GitLab at my school. But I prefer GitHub interface so maybe I'll try to switch to gogs. See Gogs, an alternative to Gitlab, it seems quite efficient and works on all plaforms even if it does not implement all features yet.

2015-03-31 GitHub, mais pourquoi ?

GitHub, c'est quoi ? En langage technique, on appelle ça un logiciel de suivi de source ou logiciel de gestion de version. On s'en sert dès qu'on travail sur des fichiers et à plusieurs. Il permet de garder la trace de toutes les modifications. L'article de Rue89 en dit un peu plus à ce sujet : Qu'est-ce que tous les techos du monde font sur GitHub ?. Aujourd'hui, on n'imagine plus s'en passer. D'ailleurs tous mes enseignements y sont : github xavier.

Même si l'outil a été développé pour développer du code informatique, il peut servir pour suivre les modifications de n'importe quel texte y compris le code civil et les images. Ca marche un peu moins bien voire souvent pas du tout pour tous les formats complexes, surtout s'ils sont propriétaires.

GitHub est gratuit pour tous les projets publics. Il faut payer si on ne veut pas exposer ses sources au public. On peut aussi aller chez le concurrent BitBucket dont les conditions tarifaires sont différentes. Si on ne souhaite pas du tout que ses sources soient hébergées par une compagnie tierce, on peut installer un serveur GitLab chez soi. Et si on souhaite juste suivre ses modifications sur son ordinateur en local, on peut installer juste Git, avec TortoiseGit.

Si vous êtes courageux, vous pouvez aller jusqu'à regarder les outils d'intégration continue tels que Travis CI ou GitLab CI.


Xavier Dupré