Git 记录大全


目录
  • 想切换成 ssh 协议来 push
  • git submodule: "already exists in the index"
  • 一些参数
    • 比较差异
    • --depth=1
  • Ubuntu Git

想切换成 ssh 协议来 push

https://stackoverflow.com/questions/14762034/push-to-github-without-a-password-using-ssh-key

示例:
git add xxx
git commit -m "xxx"
git remote set-url origin git@github.com:hebohang/glfw.git
git push

git submodule: "already exists in the index"

https://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index

一些参数

比较差异

git difftool --dir-diff

--depth=1

建议不想给项目做贡献或者看历史啥的就用这个就好了。

Ubuntu Git

https://blog.csdn.net/Chenftli/article/details/81141010

Git