- Add only modified changes and ignore untracked files
git ls-files --modified | xargs git add
- Stash the changes in a dirty working directory away
git stash save
git stash apply [index]
- error: insufficient permission for adding an object to repository database .git/objects
cd /path/to/project
sudo chown -R "${USER:-$(id -un)}" .
- remove submodule in project
git rm --cached pathtosubmodule
git submodule add ssh://git@git.github.git
git submodule update --init --recursive
git submodule update --remote --merge
git log --pretty=oneline --abbrev-commit