- git clone
- cd
- git remote rm origin
- git filter-branch --subdirectory-filter <directory 1> -- --all
You may need also to merge histories, if the new repo already exists. In order to do that, make:
- git pull --allow-unrelated-histories
And finally,
alias myip="ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'" |
find . -name "node_modules" -type d -prune -exec rm -rf '{}' + |
git fetch -p && for branch in `git branch -vv --no-color | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done |
# Revert changes to modified files. | |
git reset --hard | |
# Remove all untracked files and directories. (`-f` is `force`, `-d` is `remove directories`) | |
git clean -fd |
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.ci commit | |
git config --global alias.st status | |
git config --global alias.unstage 'reset HEAD --' | |
git config --global alias.last 'log -1 HEAD' |
{ | |
"atomKeymap.promptV3Features": true, | |
"editor.fontFamily": "Fira Code", | |
"editor.fontLigatures": true, | |
"editor.fontSize": 13, | |
"editor.formatOnPaste": true, | |
"editor.multiCursorModifier": "ctrlCmd", | |
"editor.tabSize": 2, | |
"workbench.fontAliasing": "antialiased", | |
"workbench.iconTheme": "material-icon-theme", |
You may need also to merge histories, if the new repo already exists. In order to do that, make:
And finally,
const writeLog = (text) => console.log(text) |
git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d |
// TODO |