Tips
// 不小心删除了
# git branch -D develop
Deleted branch develop (was 84aa2e6).
// 恢复
# git branch new_develop 84aa2e6
// git reflog 可以看到删除记录,找到删除的commit
// 不小心reset到某个commit
# git reset --hard commit
// git reflog 查看要恢复的commit id
# git reset --hard new_commit_id
- git cherry-pick —no-commit 只是cherry-pick到占存区
- git diff-tree HEAD —name-only -r commit-id 查看HEAD和commit-id之间修改的文件
git diff-tree HEAD --name-only -r 6696dbb002ebf8bfc0abae40b2bfb1e729c34f52 INT ✘ │ 3.79 │ 58% │ 5.7G │ at 17:25:35 │ 100% │ 130 Mbps
folly/executors/Async.h
folly/executors/GlobalExecutor.cpp
folly/executors/GlobalExecutor.h
folly/executors/SerialExecutor.h
folly/executors/test/AsyncTest.cpp
folly/executors/test/GlobalExecutorAssignmentTest.cpp
folly/executors/test/GlobalExecutorTest.cpp
folly/experimental/io/SimpleAsyncIO.h
folly/test/SingletonThreadLocalTest.cpp
- 在空目录里面提交一个.keep文件,就可以将空目录提交到远程