You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
476 B
Markdown

9 years ago
#GIT MAGIC
## Create a submodule from a specific folder
9 years ago
```
git clone <your_project> <your_submodule>
cd <your_submodule>
git filter-branch --subdirectory-filter 'path/to/your/submodule' --prune-empty -- --all
```
9 years ago
## Remove a file from history
9 years ago
```
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch \#web40.tex\#' \
--prune-empty --tag-name-filter cat -- --all
9 years ago
```
## Change commit date
git commit --amend --date="Wed Feb 16 14:00 2011 +0100"