mirror of
https://github.com/balkian/gists.git
synced 2024-12-22 14:28:12 +00:00
This commit is contained in:
parent
49a4d17a5d
commit
8aa49ff90a
14
Git magic.md
Normal file
14
Git magic.md
Normal 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
|
||||
```
|
@ -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
|
Loading…
Reference in New Issue
Block a user