Git
submodules
http://stackoverflow.com/questions/927358/how-do-you-undo-the-last-commit
revert a commit: git revert <commit>
git log --pretty=oneline --abbrev-commit
update commits timestamp
git commit --amend --date="Thu Sep 29 16:12:30 2016 +0800"
-
redo last commit:
git reset HEAD~
Find the first commit: git rev-list --max-parents=0 HEAD
http://stackoverflow.com/questions/5188914/how-to-show-first-commit-by-git-log
Rebase onto the first commit
git rebase -i --root master
get the last commit
git rev-parse HEAD
fetch pull requests locally
edit git config file:
``` [remote "upstream"]
fetch = +refs/pull//head:refs/remotes/upstream/pr/
```
Recover file from commit
git checkout <COMMIT>^ -- "<FILE_PATH>"