git config -l
git config --global user.name "xxx"
git config --global user.email xxx@qq.com
https和ssh的区别:
ssh-keygen -t rsa -C "这里换上你的邮箱"
# 关联远程仓库
$ git remote add origin [ssh地址]
# .gitignore: Cpp
*.exe
*.out
*.app
.vscode
*.bat
# .gitignore: java
*.iml
*.ipr
.idea
.classpath
.project
.settings/
bin/
target/
*.jar
*.class
*.log
*.lock
# 查看分支
git branch
# 添加分支dev
git branch dev
# 删除分支
git branch -d [branchname]
# 切换分支
git branch -b [branchname]
# 合并到当前分支
git merge [branchname]
原文:https://www.cnblogs.com/Hot-machine/p/13345667.html