Difference between revisions of "Clément Démoulins"
From LRDE
Line 20: | Line 20: | ||
== Tests == |
== Tests == |
||
− | |||
− | <!-- |
||
− | | ?News title=title |
||
− | | ?News subtitle=subtitle |
||
− | | ?News date#MEDIAWIKI=date |
||
− | | format = ul |
||
− | | template = NewsItem |
||
− | | order = descending |
||
− | | sort = News date |
||
− | | named args = yes |
||
− | --> |
||
− | {{#ask: [[Category:News]] OR [[Category:Publications]] [[Published has news::true]] |
||
− | | sort = News date |
||
− | | order = descending |
||
− | | format=feed |
||
− | | type = atom |
||
− | | page = full |
||
− | }} |
||
{{#widget:Daily Motion |
{{#widget:Daily Motion |
Revision as of 11:20, 31 March 2014
Extraire des sous dossiers d'un dépôt git
Exemple, on veut extraire les papiers de Vaucanson du dépôt commun lrde-publis.
# Clone du dépôt
git clone git@git:lrde-publis.git
git clone --no-hardlinks lrde-publis vcsn-publis
cd vcsn-publis
# Filtre tout sauf ce qui match la pattern : (\.fsmnlp|\.ciaa|\.poosc|\.vaucanson|\.gitignore|\.gitmodules)$
git filter-branch --prune-empty --index-filter "git rm -r --cached --ignore-unmatch $(git log -p | sed -rne 's/^diff --git a\/([^/]+)\/?.* b\/.*$/\1/ p' | sort -u | egrep -v '(\.fsmnlp|\.ciaa|\.poosc|\.vaucanson|\.gitignore|\.gitmodules)$' | xargs echo)" HEAD
# Nettoyage du dépôt
git remote rm origin
git update-ref -d refs/original/refs/heads/master
git reflog expire --expire=now --all
git repack -ad
Tests