添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

本文首次编辑:2016-04-27。

  • 查看 log,按 message 过滤、按 author 过滤、按日期过滤等。 https://www.atlassian.com/git/tutorials/git-log。
  • 灵活打 patch, https://www.jianshu.com/p/814fb6606734
  • 第一次切换分支,git checkout -b xxx origin/xxx
  • 后续切分支,git checkout xxx
  • 删除本地分支,git branch -d xxx
  • 删除远程分支,git push origin –delete xxx
  • 查看当前分支,git branch -a | grep “*”
  • git checkout到特定版本,git checkout upstream的前8位
  • git clone / push 的时候不用密码: git config --global credential.helper 'cache --timeout 7200' ,timeout 的单位为秒。
  • 创建分支, git checkout -b newbranch
  • 重命名分支, git branch -m oldBranch newBranch
  • 提供本地分支到远程 repo(远程 repo 无此分支), git push origin newBranch or git push -u origin newBranch
  • 强制推送本地修订,覆盖远程 repo。会覆盖此间别人的提交。 git push --force-with-lease
  • 打 patch 时,如何把 patch 中的 commit message 和 user 保持不变? git am xxx.patch ,与 git format-patch 相对应

  • stage

    Q:多一个 stage 有什么优点?
    A:暂存空间。git add 后的文件放到 stage 区,再修改同样的文件,其修订不会体现在此次 commit,除非再 git add 一次。

  • git format-patch,已提交版本生成 patch
  •