--- title: Git magic tags: git --- ## clone a git repository with submodules ``` git clone xx git submodule init git submodule update ``` ## delete branch delete branch locally `git branch -d localBranchName` delete branch remotely `git push origin --delete remoteBranchName` # merge master into feature branch ``` git checkout fun_feature git merge master ls git reflog git push origin fun_feature ```