|
@@ -15,6 +15,8 @@ git pull gogs master
|
|
|
# 不设置全局的话,在每一个仓库第一次提交时都需要先设置用户名和邮箱
|
|
|
git config --global user.name "yourName"
|
|
|
git config --global user.email "yourEmail"
|
|
|
+# 设置自动保存帐号密码
|
|
|
+git config --global credential.helper store
|
|
|
# 同步tags到远端
|
|
|
git push origin --tags
|
|
|
# 生成公钥和私钥
|
|
@@ -25,4 +27,12 @@ ssh -t git@仓库地址
|
|
|
git branch -m master algorithm
|
|
|
# 删除远端分支 要求被删除的分支不能是默认分支
|
|
|
git push --delete origin master
|
|
|
+
|
|
|
+# 分支操作
|
|
|
+# 列出所有分支,包含远程分支
|
|
|
+git branch -a
|
|
|
+# 删除本地分支
|
|
|
+git branch -d branch_name
|
|
|
+# 删除远程分支
|
|
|
+git push remote_name --delete branch_name
|
|
|
```
|