git基本语法
来源:互联网 发布:低成本网络推广 编辑:程序博客网 时间:2024/06/06 05:41
git
基本语法
设置用户名和邮箱
git config --global user.name "Your Name";git config --global user.email "Your email";
初始化一个仓库
在当前目录下初始化一个仓库
git init//Initialized empty Git repository in D:/gittest/.git/
将一个文件添加到版本库
将文件添加到仓库
git add 1.txt//可以添加多个文件
用命令git commit
将文件提交到仓库
git commit -m "提交测试文本1.txt";
git commit -m
m参数后跟的字符串是此次提交的说明文本
查看库的当前状况
git status
查看差异
git diff
查看历史记录
git log
版本回退
回退上N个版本
git reset --hard HEAD~1 //回到上一个版本
回退到指定版本
git rest --hard 46cbb8e1e //去hash值为46cbb8e1e开头的版本 可以去未来版本
查看操作的历史记录
git reflog
阅读全文
0 0
- Git基本语法
- Git基本语法
- git基本语法
- git 语法
- Git语法
- git语法
- 基本语法
- 基本语法
- 基本语法
- 基本语法
- 基本语法
- 基本语法
- 基本语法
- 基本语法
- 基本语法
- 基本语法
- git基本
- git基本
- 记录一些很简单的linux操作命令
- HTML5 input file 图片上传,压缩,上传,预览
- python 实现5种强大的概率分布
- 1px在高清屏幕上的问题
- 创建父子maven工程
- git基本语法
- 程序性动画 1 ——程序性动画介绍
- 图片预览效果
- Android 多个Fragment切换时,避免重复创建Fragment。
- Cocos2dx-3.x减小空包体方法
- Linux终端内容太多无法全部显示
- 一致性哈希算法(consistent hashing)
- 继承、派生、组合
- OpenCV学习记录(一):使用haar分类器进行人脸识别