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" #生成SSH
git config --global --list #查看配置结果
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