首页 > 其他 > 详细

git基本使用

时间:2020-12-05 09:21:49      阅读:27      评论:0      收藏:0      [点我收藏+]
git config --global core.autocrlf false 不会自动将UNIX 格式转换为DOS格式
git config --global user.name "liboye"
git config --global user.email "liboye@126.com"
ssh-keygen -t rsa -C "liboye@126.com"
git branch -a 查看所有分支(远程、本地)
git branch 查看本地分支
git branch test 创建分支
git clone -b beanch_name git@gitlab
git clone ssh:git@gitlab.test.com
cd sdm-hql
git chechout test 切换分支
git rm * -rf
git add .
git commit -m "test"
git push origin test 提交分支

git  branch -m old_branch new_branch  重命名分支
git push origin --delete old_branch  删除远程分支
git push origin new_branch 将重命名的分支提交

【放弃本地版本,直接覆盖】
git reset --hard
git pull

【克隆远程dev分支】
git clone -b dev git@172.17.16.102:dept/test.git

【合并分支】
git clone https://gitee.com/aa/test.git
git checkout -b dev origin/dev 将本地分支的dev 分支合并与远程dev分支对应
git checkout master
git merge dev
git push origin master

  

git基本使用

原文:https://www.cnblogs.com/boye169/p/14088269.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!