标签:简化   ORC   ubuntu   版本   checkout   config   状态   文件   lin   
       Git
命令集合
git config --global user.name 
git config --global user@qq.com 
git init opt 
git status 
git add:提交代码到暂存区 
 git commit -m ‘注释的信息‘ file文件:把文件提交到仓库 
git remote add origin https://gitee.com/whatjso/oldboygit.git 
 git push origin master 
git reset --hard ‘HEAD^‘ 
git pull origin master 
git push origin master --force 
分支管理
git branch 
git branch dev 
git checkout dev 
git merge dev 
git改动日志查看
git log:
git log file:
git log 
git reflog:
查看远程仓库
 git remote 
 git remote -v 
删除远程仓库
git remote remove <远程地址> 
git remote remove origin 
添加远程仓库
git remote add <远程仓库别名><远程仓库地址> 
修改远程仓库
git remote rename <旧名称><新名称> 
1、使用git先进行配置:
$git config --global user.name #名称 
$git config --global user@qq.com #邮箱 
2、创建版本库
cd opt
mkdir test
root@VM-0-12-ubuntu:/opt
Reinitialized existing Git repository in /opt/.git/ 
root@VM-0-12-ubuntu:/opt
. .. .git test
root@VM-0-12-ubuntu:/opt
3、解决冲突
1、把冲突当中文件删掉 
2、然后重新git add 
3、git commit 
4、git push origin master
GIT使用
标签:简化   ORC   ubuntu   版本   checkout   config   状态   文件   lin   
原文地址:https://www.cnblogs.com/liuxiangpy/p/9864569.html