博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
git 常用指令
阅读量:4285 次
发布时间:2019-05-27

本文共 453 字,大约阅读时间需要 1 分钟。

1.git clean -d -x -f

will remove untracked files, including directories (-d) and files ignored by git (-x). Replace the -fargument with -n to perform a dry-run or -i for interactive mode and it will tell you what will be removed.

2.git reset --hard

 To reset the entire repository to the last committed state

1沒辦法移除原本就有被tracked files,所以必須在靠2,來把有修改過得檔案,也回復到最後的commit state

適合情況:新的一包git trunk抓下來,有修改一些東西,也有build過,但還沒commit,而且回到最初剛抓下來時的樣子時,就適合同時使用1 and 2來處理

转载地址:http://eqsgi.baihongyu.com/

你可能感兴趣的文章
nginx 负载均衡
查看>>
js bootstrap 警告框的隐藏和显示
查看>>
centos 7.1安装docker
查看>>
docker 创建一个新镜像
查看>>
docker server gave HTTP response to HTTPS client 问题处理办法
查看>>
docker 导入与导出镜像
查看>>
docker 创建本地registry并push镜像
查看>>
docker 在push镜像到本地registry出现的500 Internal Server Error
查看>>
Linux磁盘空间查看及空间满的处理
查看>>
Linux下clock计时函数学习
查看>>
OpenMp多线程编程计时问题
查看>>
Linux/Unix 环境下实现精确计算程序运行的时间
查看>>
C++实现统计代码运行时间计时器的简单实例
查看>>
c++ 内联函数(一看就懂)
查看>>
比较fscanf 和getline读取文件效率
查看>>
(文件)输出不使用科学技术法
查看>>
LaTeX 算法代码排版 --latex2e范例总结
查看>>
常用泰勒展开
查看>>
vector length_error
查看>>
Shell脚本处理浮点数的运算和比较实例
查看>>