|
@@ -0,0 +1,22 @@
|
|
|
+# git
|
|
|
+
|
|
|
+[官方下载](https://git-scm.com/)
|
|
|
+
|
|
|
+## git常用命令
|
|
|
+
|
|
|
+```sh
|
|
|
+# 全局设置
|
|
|
+# 不设置全局的话,在每一个仓库第一次提交时都需要先设置用户名和邮箱
|
|
|
+git config --global user.name "yourName"
|
|
|
+git config --global user.email "yourEmail"
|
|
|
+# 同步tags到远端
|
|
|
+git push origin --tags
|
|
|
+# 生成公钥和私钥
|
|
|
+ssh-keygen -t rsa -C "yourEmail"
|
|
|
+# ssh测试
|
|
|
+ssh -t git@仓库地址
|
|
|
+# 分支改名
|
|
|
+git branch -m master algorithm
|
|
|
+# 删除远端分支 要求被删除的分支不能是默认分支
|
|
|
+git push --delete origin master
|
|
|
+```
|