Git file
2016-04-15 14:50
417 查看
In a local repository.
1. add first.txt to repository, use Git bash
2. commit change
3. check content change
4. commit change
5. remove a file
6. test if the file exists and can be removed
7. Revert the changes specified by the fourth last commit in HEADand create a new commit with the reverted changes.
1. add first.txt to repository, use Git bash
$ git add first.txt
2. commit change
$ git commit -m 'my first commit'
3. check content change
$ git diff first.txt
4. commit change
$ git commit -m 'my second commit'
5. remove a file
$ git rm Documentation/\*.txt
6. test if the file exists and can be removed
$ $ git rm -n aa.txt[/code]
7. Revert the changes specified by the fourth last commit in HEADand create a new commit with the reverted changes.
git revert HEAD~3
8.revert a commit
git revert 64158c6f740083d89b25575c82e2413548e1a5f0
相关文章推荐
- PMCFF产品经理
- My97DatePicker使用技巧
- 证明:gcd(m,n)=gcd(n mod m,m)成立,m,n为正整数,m>0. 【Euclid算法证明】
- 三个CSS技巧你应该知道
- Linux命令 - iostat
- Linux --进程间通信--共享内存
- php错误以及常用笔记
- Kafka的配置要点
- 工作小结_2016-4-15 14:37:22
- 网站调研及分析工具4Q
- VS2013中C#读取SQLite数据
- 在scott中开启autotrace
- AudioContext接口的API整理
- ***博客系统文章的数据库存储方式
- Android自动化测试(UiAutomator)简要介绍
- 4G频段
- 北邮OJ 1005. 16校赛-Hawei Learning C
- SEM语义分析及跳出率优化
- 2. PHP变量
- TOMCAT-SSL双向认证-配置实例