git reset test.txt #将指针后移
git checkout test.txt #重新检出一份代码,检出的版本是当前workspace 最新的commit版本
git reset test.txt #无改变,因为未受控,未追踪
git checkout test.txt #撤销修改内容
git reset test.txt #返回到未add 的状态
git checkout test.txt #撤销修改内容
##对于修改已经commit 到本地仓库的
git log -n 2 ##找到上一次commit pre-ID
git reset pre-ID ## 将workspace 恢复到上一条commit,即撤销本次commit
git status ## 可以看到文件又回到add 未commmit状态
git reset ID
git status
git checkout XXX XXXXfile
git reset --hard ID ## --hard 表示回退指针再恢复文件内容
## 即--hard == reset + checkout
git status
# 以下摘自https://git-scm.com/book/zh/v2
虽然在调用时加上 --hard 选项可以令 git reset 成为一个危险的命令(译注:可能导致工作目录中所有当前进度丢失!),但本例中工作目录内的文件并不会被修改。 不加选项地调用 git reset 并不危险 — 它只会修改暂存区域。
git pull = git fetch + git merge
## git 会进行智能合并,不能自动解决冲突的,会变成nnmerge 状态,需要手动编辑合并
是挑选出特定的commit , 推送到另一个分支中
Workspace - Private developer work area.
Stream - Configuration of related elements. Code may be promoted into or inherited from streams.
Depot - Main repository on a server for all related source code.
Snapshot - Static (protected) stream that cannot be moved, renamed, or altered
GitLab Geo , replica server for gitlab
https://about.gitlab.com/solutions/geo/
https://docs.gitlab.com/ee/administration/geo/replication/index.html
........
依赖: java
jdk 已经安装,路径也全部配置正确,但是安装程序仍报以下错误:
1. 修改密码
Preferences --> Name and Password
可以修改密码,姓名,邮箱地址
需求:
1. 根据bug list 导出表格
2. 指定显示固定字段
3.使用bugzilla 自有的导出CSV 格式
思路:
1. bugzilla 导出查询结果的功能已有,可以直接在页面点击csv , 通过浏览器直接下载表格。
2. 需求转化为如何生成下载csv 的url 。
3. 取一个url 进行分析 ,抽取其中的 bug list 和固定字段 进行切割,使下载链接模板化。
4. 使用bug list 和固定字段作为参数,对url 模板进行实例化。
5. 其他: 模拟浏览器 ,进行登录,下载 。
6. 扩展: 修改值,提交修改。
每次与git做通讯时,需要输入用户密码,记住密码的方式如下:
git config --global credential.helper store
git config --list
##可见一行credential.helper=store
##表示认证信息将会存储
.................
redhat 安装 git 图形化工具 gitk
yum install gitk
##安装过程yum 会自动检测依赖的软件是否安装及版本是否匹配,并进行依赖安装或升级
.........