Article Directory
1. Background
We usually develop when the function for different modules, it is best to create a new branch to develop, or develop the division of labor, that time can be integrated into the master, the module to facilitate parallel development.
2, commonly used commands
To create a user branch, for example, the last master merge into the main branch, the following non-red mark can be omitted, see personal habits, confirm the current status
查看当前分支
git branch
创建一个名叫user的分支
git checkout -b user
// Check if the current user in the branch
git branch
查看文件状态(看是否有文件没有添加到缓存区)
git status
将没有提交的文件首次添加到缓存区
git add .
// Check file status (whether confirmed has been added to the buffer zone)
git status
提交本地信息
git commit -m "完成了user模块的开发"
// Check if you submitted is complete, and view the current branch
git status
But this time the warehouse and there does not appear to have a new branch
把本地的user分支推送到云端并以user名保存分支
git push -u origin user
So, we have developed over user how merged into the main branch master it?
切换到主分支 master
git checkout master
Confirm the current main branch
git branch
合并user分支
git merge user
将本地的master代码推送到云端进行保存
git push
3. Conclusion
At this point, our function is complete!
Vue family bucket develop the electricity business management system code cloud address, welcome to learn together ~
https://gitee.com/Chocolate666/vue_shop
Finally, after reading this blog, I feel quite helpful, can continue to view the contents of other columns wailing, Vue together to learn it ~
Click to enter Vue❤ learn column ~
学如逆水行舟,不进则退