git tip: How to undo an uncommitted change/deletion for a specific file in your working directory
来源:互联网 发布:js escape替代方法 编辑:程序博客网 时间:2024/06/05 07:42
Imagine you are in a situation: You deleted/modified a file, then before you commit, you realized you it was a bad idea to delete / to make changes to that file. you do not want to commit that deletion/change, in other words, you want the file to go back to the same status as you last pulled from the remote repo. Other than finding the file back from the recycle bin, you can use
git checkout -- your/file/name
to discard changes you made to a specific file in your working directory. Also, the wild card works here, too. Use
git checkout -- *
to remove all changes made to unstaged files that are listed by
git status
0 0
- git tip: How to undo an uncommitted change/deletion for a specific file in your working directory
- how to unzip a file in a system directory
- Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your a
- How to use 'cp' command to exclude a specific directory?
- How to generate a selective deletion program for info provider
- How to find number of a specific integer in an array of Fixnums ruby
- How to point cmake at specific directory for library?
- How to add a new "CustomAction" in ECB for a specific list
- Directions for having MATLAB startup in your last working directory
- how to change file names in matlab
- git commit时出现的问题The file will have its original line endings in your working directory
- How to merge/cover specific file using git
- How to: Locate a Specific Row in a DataTable
- A Vim Tip: How to copy content of work directory
- how to get cwd(current working directory) in python?
- Howto change all file and directory in a folder to 777?
- How to get your ASP.NET application working in IE11
- How to change mysql default data directory in Ubuntu
- Guanssian Filter
- linux输入子系统概念介绍
- linux 小知识系列
- Oracle round和trunc函数
- Silverlight基础学习1/23
- git tip: How to undo an uncommitted change/deletion for a specific file in your working directory
- struts2的执行流程分析
- 高性能C++网络库libtnet实践:comet单机百万连接挂载测试
- c++学习笔记(12.继承与多态)
- linux内核编程之list_head
- 基于QMainWindow主窗体程序
- UML图 符号的定义
- 图像检索中一些特征索引技术
- 阿里巴巴集团2014秋季校园招聘笔试题