[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 ...
随机推荐
- 线程池之 Executors
线程池之 Executors + 面试题 线程池的创建分为两种方式:ThreadPoolExecutor 和 Executors,上一节学习了 ThreadPoolExecutor 的使用方式,本节重 ...
- mybatis从数据库中取数据且分组,返回分组数据
mapper.xml文件 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PU ...
- CSS selector? [class*=“span”]怎么理解
我在Twitter 中有看到如下selector: .show-grid [class*="span"] { background-color: #eee; text-align: ...
- USBWebServer - 在U盘里搭一个Web服务器!
文章选自我的博客:https://blog.ljyngup.com/archives/321.html/ 本文将介绍一款可以在U盘内直接搭建Web服务器的软件 软件可以免安装直接在U盘内运行,适合外出 ...
- docker device or resource busy
docker-compose -f docker-compose.yml up -d 时候报错 device or resource busy 使用 docker-compose down 会导致一 ...
- 兄弟连 企业shell笔试题 1-15
这些题目收集自网络,对比原来的答案,又根据实际情况重新编写了自己的答案 企业实践题1: (生产实战案例):监控MySQL主从同步是否异常,如果异常,则发送短信或者邮件给管理员.提示:如果没主从同步环境 ...
- Django 配置文件 settings.py
1. dubug配置 DEBUG=False 2. 数据库配置 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', &qu ...
- [MacOS]MacOS字体文件位置
$ cd /System/Library/Fonts $ ls Apple Braille Outline 6 Dot.ttf Noteworthy.ttc SFCompactText-Regular ...
- A water problem 大数取余。
A water problem Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)T ...
- 杭电-------2051Bitset(C语言)
#include<stdio.h> ] = { }; int main() { int m; ; while (~scanf("%d", &m)) { whil ...