If you've added files to the staging area (the Index) accidentally - you can remove them using git reset.

We'll first add a file to staging, but then back it out with:

git reset HEAD filename

in order to pull it back to the working directory, so it doesn't end up in a commit when we don't want it to.

You created a new file lib.js

You have add to stating area.

git status
git add .

But later you find out that you don't want to add lib.js

git log --oneline

Run:

git reset HEAD lib.js

It will untrack lib.js file.

最新文章

  1. Magic CSS3 – 创建各种神奇的交互动画效果
  2. 如何采集QQ群中所有成员QQ号码
  3. React Native 开发笔记
  4. strip_tags() 函数剥去 HTML、XML 以及 PHP 的标签
  5. 抓取锁的sql语句-第四次修改
  6. javascript之attribute 和 property
  7. bzoj 1196
  8. cf492B Vanya and Lanterns
  9. opensatck 在启动的时候注入额外的信息
  10. childNodes属性 和 nodeType属性
  11. Java I/O---输入与输出
  12. Apache shiro集群实现 (二) shiro 的INI配置
  13. ASP.NET Core + Vue.js 开发
  14. CentOS 7 输入中文 & 安装搜狗输入法
  15. python,获取用户输入,并且将输入的内容写到.txt
  16. Django 之缓存
  17. SG 大法(Sprague-Grundy函数)
  18. Linux下开发python django程序(模板设置和载入数据)
  19. 【leetcode 简单】 第一百零六题 压缩字符串
  20. e677. 模糊化图像

热门文章

  1. 另一个角度的redis--redis 可以看做是c/s架构的软件
  2. SQL Server 连接字符串总结
  3. MySQL常用sql语句大全
  4. 微信小程序必知相关知识
  5. jQuery中的DOM操作【续】
  6. js高频经典面试题总结
  7. Beego 学习笔记一:环境的配置
  8. JavaScript 事件(基础)
  9. Java语法知识点2
  10. windows 2003 windows 2008 windows 2012 导出域控hash的方法