[Linux] git add时的注意事项
git add -A 提交所有变化
git add -u 提交被修改(modified)和被删除(deleted)文件,不包括新文件(new)
git add . 提交新文件(new)和被修改(modified)文件,不包括被删除(deleted)文件
并且git 只监控文件内容变化,不监控目录,因此不能直接提交一个空目录,可以在空目录里创建一个文件提交
当直接提交空目录时,会报这样的错误,因为根本没有内容变化

[Linux] git add时的注意事项的更多相关文章
- git add时遇到类似fatal: Path 'XXX' is in submodule 'XXX'错误提示如何解决?
答:示例如下: fatal: Pathspec 'Vundle.vim/autoload/vundle.vim' is in submodule '.vim/bundle/Vundle.vim' 解决 ...
- git add 时忽略某些文件或者文件夹
1.git bash 新建 .gitignore文件 touch .gitignore 2.修改.gitignore文件,如下 target/ !.mvn/wrapper/maven-wrapper ...
- [Git add . ] 遇到The file will have its original line endings in your working directory 解决办法
1.在新项目中使用[ git add . ]时出现: warning: LF will be replaced by CRLF in ...... The file will have its ori ...
- 详解gitignore的使用方法,让你尽情使用git add .
大家好,欢迎来到周一git专题. 今天和大家聊聊gitignore的作用,其实如果你英文还可以的话,你应该已经基本上猜到它的作用了.ignore在英文当中的意思是忽视.忽略,gitignore自然就是 ...
- git add提交时关于 LF will be replaced by CRLF in 问题出现的原因以及解决方式
最近在新创建的github项目中add新框架代码时,出现了LF will be replaced by CRLF in的问题,以下为问题截图 查阅资料才知道,LF和FRLF是两种不同的换行格式,这个警 ...
- git add --all 为啥不能添加空文件夹,这样设计的初衷是
git add --all 为啥不能添加空文件夹,这样设计的初衷是? 好多项目还得弄个假文件在空文件夹里面占位 这个算设计失误吧,见 https://git.wiki.kernel.org/index ...
- Linux+Git命令
Linux 文件与目录 cd命令: $ cd [path] //path为路径名称,这只是常规语法 1 详细用法如下: $ cd /d //进入d盘 $ cd d: //进入d盘 $ cd D: // ...
- 26. Linux GIT
windows git 下载链接: Msysgit https://git-scm.com/download/win 1 进入git bash进行第一次配置 git config --global ...
- git提交时支持文件名大小写的修改
在windows环境下,git提交文件时,默认对文件名大小写不敏感,若修改了文件名字的大小写,可能会导致提交时没有记录,文件名修改不成功.网上搜集了几种解决方法,现总结下: 1. 修改git conf ...
随机推荐
- WTL对话框添加背景图片
WTL91_5321_Final + VS2013 + WIN7 // MainDlg.h : interface of the CMainDlg class // ///////////////// ...
- LeetCode 547. Friend Circles 朋友圈(C++/Java)
题目: https://leetcode.com/problems/friend-circles/ There are N students in a class. Some of them are ...
- SpringMVC基础(一)_控制器
Spring MVC Spring MVC 基于模型-视图-控制器(Model-View-Controller)模式实现,它能够帮你构建灵活和松耦合的应用程序. 1.Spring MVC的请求追踪 每 ...
- MyBatis基础_连接池与事务、动态SQL、注解开发
一.MyBatis连接池及事务控制 1.连接池 在实际开发中,都会使用连接池,因为它可以减少获取连接缩消耗的时间.所谓连接池,就是存储数据库连接的容器.连接池中存储一定数量的数据库连接,当线程需要使用 ...
- Python趣味入门01:你真的了解Python么?
小牛叔倾情出品,史上更简单有趣的Python入门系列教程,用认真.上心的原创带你飞. 0.Why Python ? 什么入门用python,其实这和它的气质有关,根据CHM(计算机历史博物馆)网站介绍 ...
- sqlserver check running process 1
check process script 1, check which is current running: use master SELECTspid,ER.percent_complete,CA ...
- ansible----sudo
ansible 执行sudo的root命令,参看https://www.cnblogs.com/infaaf/p/10049896.html [nnn]103 ansible_ssh_host=10. ...
- pycharm创建Django项目时报 AttributeError:'module' object has no attrbute 'main' 错误或者创建了就只有venv一个目录
这是因为创建项目时候没有选择合适的项目环境. 所以在创建项目的时候选择一下项目的环境,比如选择python的运行环境 这时候创建的项目就不再报 AttributeError:'module' obje ...
- Centos7.5中Nginx报错:nginx: [error] invalid PID number "" in "/run/nginx.pid" 解决方法
服务器重启之后,执行 nginx -t 是OK的,然而在执行 nginx -s reload 的时候报错 nginx: [error] invalid PID number "" ...
- indexedDB 使用
数据库的打开/新增/删除 initDB() { let _this = this; let obj = { id: 1, name: _this.addForm.content } let index ...