1
0
mirror of https://github.com/balkian/gists.git synced 2024-12-22 14:28:12 +00:00
This commit is contained in:
J. Fernando Sánchez 2015-02-27 10:11:44 -08:00
parent 49a4d17a5d
commit 8aa49ff90a
2 changed files with 14 additions and 3 deletions

14
Git magic.md Normal file
View File

@ -0,0 +1,14 @@
# Create a submodule from a specific folder
```
git clone <your_project> <your_submodule>
cd <your_submodule>
git filter-branch --subdirectory-filter 'path/to/your/submodule' --prune-empty -- --all
```
# Remove a file from history
```
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch \#web40.tex\#' \
--prune-empty --tag-name-filter cat -- --all
```

View File

@ -1,3 +0,0 @@
git clone <your_project> <your_submodule>
cd <your_submodule>
git filter-branch --subdirectory-filter 'path/to/your/submodule' --prune-empty -- --all