mirror of
https://github.com/balkian/gists.git
synced 2024-12-03 13:52:28 +00:00
Add 'repos/fb9e68c7ec482d136c77/' from commit 'a31eb9b14ccf631ff56de7264d3461e66d075b1c'
git-subtree-dir: repos/fb9e68c7ec482d136c77 git-subtree-mainline:092e91e6a3
git-subtree-split:a31eb9b14c
This commit is contained in:
commit
73c547ec0c
19
repos/fb9e68c7ec482d136c77/Git magic.md
Normal file
19
repos/fb9e68c7ec482d136c77/Git magic.md
Normal file
@ -0,0 +1,19 @@
|
||||
#GIT MAGIC
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
## Change commit date
|
||||
git commit --amend --date="Wed Feb 16 14:00 2011 +0100"
|
Loading…
Reference in New Issue
Block a user