Git常用命令
来源:互联网 发布:欧洲旅游价格知乎 编辑:程序博客网 时间:2024/05/20 18:54
初始化开始命令
git init或者git clone url
配置命令
git config --global color.ui truegit config --global push.default currentgit config --global core.editor vimgit config --global user.name "~~"git config --global user.email "~~@~~.com"git config --global diff.tool meld
本地分支管理命令
// 查看本地分支列表git branch // 切换到branchname本地分支 git checkout branchname // checkout当前分支到一个新分支,命名为new_branch_name git checkout -b new_branch_name // 将当前分支合并到branchname分支中git merge branchname// 查看所有 commitsgit log// 查看当前分支的状态git status// 添加已修改的filename文件到暂存区git add filename// 添加所有已修改的文件到暂存区git add .// Tell git not to track file anymoregit rm filename// 将以添加在暂存区的文件提交到储存区git commit// 将以添加在暂存区的文件提交到储存区,并提交commit messagegit commit -m "Some commit message"// 查看当前的改变与上次commit的区别git diff// Compare current branch to some other branchgit diff branch_name
远程分支管理命令
// See list of remote repos available.git remote// 从远程仓库添加一个项目到本地git remote add orgin url// 将当前分支推送到远程仓库git push// 将当前分支推送到远程项目的master分支git push orgin master// 拉取远程仓库中的与本地分支不同的commitgit pull
1 0
- git 常用命令
- Git常用命令
- git 常用命令
- git 常用命令
- git 常用命令
- git 常用命令
- GIT常用命令
- git 常用命令
- git 常用命令
- Git 常用命令
- git 常用命令
- Git常用命令
- Git常用命令
- git 常用命令
- Git 常用命令
- git常用命令
- git 常用命令
- Git 常用命令
- 为什么Java是单继承?
- JSP的运行原理
- activiti工作流的web流程设计器整合视频教程 SSM和独立部署
- 对抗某讯手游保护解密U3D脚本DLL
- 【CodeForces 779A】Pupils Redistribution(模拟)
- Git常用命令
- CodeForces 767C Garland【DFS+vector】
- springmvc整合mybatis框架源码 bootstrap html5 mysql oracle
- 答案二分,lowerbound,upperbound
- PHP读取XML文件的方法
- 直接用socket实现HTTP协议(下载专用)
- caffe学习笔记12-建立自己的数据集与均值计算
- 异步网页采集利器CasperJs
- 2017.2.27-2017.3.5 第一个星期 header 直接生成xls导出