生成一个新的SSH key: ssh-keygen -t rsa -b 2048 -C "邮箱地址" 1.Git 全局设置 git config --global user.name "名字" git config --global user.email "邮件地址" 2.已存在的文件夹或 Git 仓库 cd hplc git init git remote add origin git@code.aliyun.com:yuekundianqi/hplc.git git add * git commit -m "注释" git push -u origin master 3.git常用命令 创建分支: 两步骤 1.新建并切换本地分支: git checkout -b 分支名称 2.推送到远程分支: git push origin 本地分支名字:feature/hplc1.0 删除远程分支dev: git push origin --delete 分支名称 删除本地分支dev: git branch --delete 分支名称 查看分支: 两种 1.查看本地分支: git branch 2.查看所有分支(本地和远程分支): git branch -a 切换分支: git checkout 分支名称 本地创建分支:git branch feature/hplc1.0 本地创建并切换分支:git checkout -b feature/hplc1.0 推送到远程分支:git push origin feature/hplc1.0 一条龙命令:git push origin 本地分支名字:feature/hplc1.0 4. git代码提交 //当前分支feature/hplc1.0 git add * git reset XX git commit -m "注释" git push origin feature/hplc1 git checkout dev git merge feature/hplc1 git push origin dev git checout master git merge dev git push origin master
08-03
7821
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-15
06-05
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交