git init 初始化本地库
git status 本地库状态
$ git status 本地库状态 On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track) # 还没有文件
$ git status On branch master
No commits yet
Untracked files: (use "git add <file>..." to include in what will be committed) test.txt
nothing added to commit but untracked files present (use "git add" to track)
|
git config —list #查看git配置信息

查看用户名,密码和邮箱命令:
git config user.name git config user.password git config user.email
|
设置或修改用户名,密码和邮箱命令:
git config --global user.name "freedom" git config --global user.password "123456" git config --global user.email "12345678@qq.com"
|
git强制提交本地分支覆盖远程分支
git push origin 分支名 --force
|
Git分支
切换分支
查看分支
gitignore模板
*.class *.log *.lock
# Package Files # *.jar *.war *.ear target/
# idea .idea/ *.iml/
*velocity.log*
### STS ### .apt_generated .factorypath .springBeans
### IntelliJ IDEA ### *.iml *.ipr *.iws .idea .classpath .project .settings/ bin/
*.log *.log/ tem/
#rebel *rebel.xml*
*.gitignore
|
使用码云
- 注册登录,完善信息
- 设置本机绑定SSH密钥,实现免密码登录

- 添加密钥到码云

- 使用码云创建自己的仓库
许可证:开源是否可以随意转载,开源但不能商业使用、不能转载,…限制
- 克隆自己的仓库
