git常用知识点

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、待更新

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值