- 初始化仓库
git init
2. 链接远程仓库
git remote add origin 'https://gitee.com/huangduoju/haoliangxin-lottery-activity.git'
3. 提交本地代码(进行commit提交)
git add .
git commit -m ""
4. 创建分支
git branch 分支名
5. 选择刚刚创建的分支
git checkout 分支名
6. 查看所选中的分支
git branch -a
7. 提交分支代码
git push origin 分支名
Git基本操作:初始化、远程连接与分支管理
本文介绍了如何使用Git进行项目管理,包括初始化仓库、添加远程仓库、提交本地代码、创建和切换分支,以及将分支代码推送到远程仓库的过程。





