git常用知识点
1、当生产要上线时需要把开发分支(dev为例)合并mastergit checkout devgit pullgit checkout mastergit merge devgit push -u origin master2、当产品定义好之后需要从master 拉到devgit checkout mastergit pullgit checkout dev...
·
1、当生产要上线时需要把开发分支(dev为例)合并master
git checkout dev
git pull
git checkout master
git merge dev
git push -u origin master
2、当产品定义好之后需要从master 拉到dev
git checkout master
git pull
git checkout dev
git merge master
3、当git 冲突时候
git stash
git stash pop
4、新建分支和删除分支
git checkout -b dev 新建(然后在提交)
git branch -d dev 删除本地分支
git push origin --delete dev 删除远程分支
5、打tag
git tag 查看本地的所有Tag
git tag -a v1.0 -m "对Tag的描述信息" 创建tag命令
git push origin --tags 提交tag命令(远程)
git tag -d v1.0 删除tag命令
git push origin --delete tag v1.0 删除远程tag
6、多个钩子问题
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> proposal
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached proposal
hint:
hint: See "git help submodule" for more information.
解决方案:
rm -rf ./proposal/.git
7、待更新
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
已为社区贡献2条内容
所有评论(0)