{"action":"opened","issue":{"url":"https://api.github.com/repos/JiaxiangZheng/tech-notes/issues/1","labels_url":"https://api.github.com/repos/JiaxiangZheng/tech-notes/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/JiaxiangZheng/tech-notes/issues/1/comments","events_url":"https://api.github.com/repos/JiaxiangZheng/tech-notes/issues/1/events","html_url":"https://github.com/JiaxiangZheng/tech-notes/issues/1","id":124533662,"number":1,"title":"Git 拾遗","user":{"login":"JiaxiangZheng","id":1008308,"avatar_url":"https://avatars.githubusercontent.com/u/1008308?v=3","gravatar_id":"","url":"https://api.github.com/users/JiaxiangZheng","html_url":"https://github.com/JiaxiangZheng","followers_url":"https://api.github.com/users/JiaxiangZheng/followers","following_url":"https://api.github.com/users/JiaxiangZheng/following{/other_user}","gists_url":"https://api.github.com/users/JiaxiangZheng/gists{/gist_id}","starred_url":"https://api.github.com/users/JiaxiangZheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiaxiangZheng/subscriptions","organizations_url":"https://api.github.com/users/JiaxiangZheng/orgs","repos_url":"https://api.github.com/users/JiaxiangZheng/repos","events_url":"https://api.github.com/users/JiaxiangZheng/events{/privacy}","received_events_url":"https://api.github.com/users/JiaxiangZheng/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JiaxiangZheng/tech-notes/labels/Git","name":"Git","color":"e6e6e6"},{"url":"https://api.github.com/repos/JiaxiangZheng/tech-notes/labels/TODO","name":"TODO","color":"fc2929"},{"url":"https://api.github.com/repos/JiaxiangZheng/tech-notes/labels/%E5%B7%A5%E5%85%B7","name":"工具","color":"159818"},{"url":"https://api.github.com/repos/JiaxiangZheng/tech-notes/labels/%E7%AC%94%E8%AE%B0","name":"笔记","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"JiaxiangZheng","id":1008308,"avatar_url":"https://avatars.githubusercontent.com/u/1008308?v=3","gravatar_id":"","url":"https://api.github.com/users/JiaxiangZheng","html_url":"https://github.com/JiaxiangZheng","followers_url":"https://api.github.com/users/JiaxiangZheng/followers","following_url":"https://api.github.com/users/JiaxiangZheng/following{/other_user}","gists_url":"https://api.github.com/users/JiaxiangZheng/gists{/gist_id}","starred_url":"https://api.github.com/users/JiaxiangZheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiaxiangZheng/subscriptions","organizations_url":"https://api.github.com/users/JiaxiangZheng/orgs","repos_url":"https://api.github.com/users/JiaxiangZheng/repos","events_url":"https://api.github.com/users/JiaxiangZheng/events{/privacy}","received_events_url":"https://api.github.com/users/JiaxiangZheng/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2016-01-01T06:37:53Z","updated_at":"2016-01-01T06:37:53Z","closed_at":null,"body":"## Git 拾遗\r\n\r\n- http://www.codingstyle.cn/topics/51?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io\r\n\r\n    - stash ==> 临时缓存起来，比如没有提交之前，先 pull 并 rebase 的时候，可以先把本地的修改 stash 起来\r\n    - git tag v0.0.2 && git push origin v0.0.2 （git push remote —tags 可提交所有本地的 tag）\r\n    - git commit -m “XXX” --date=“2016/12/12\"\r\n    - git remote -v 显示 remote 信息\r\n    - git blame -L 10,+4 file   定位问题利器 TODO：\r\n    - git branch test_branch aha-hash 可以直接在某个提交处创建分支\r\n    - git fetch\r\n    - git rebase master feature：将 feature 分支合到 master 中\r\n    - git cherry-pick：分支已经不想要了，但里面的部分提交记录希望合到主分支，这时候 cherry-pick 派上用场了\r\n    - git grep -n “TODO”：\r\n    - git merge --squash feature-branch\r\n    - bisect：查 BUG 利器\r\n    - git add -p 或 git commit -p，允许只提交文件中一部分改动\r\n    - git submodule add repo-url\r\n"}}