git add .老半天没反应

WBOY
Release: 2016-06-06 20:11:08
Original
5235 people have browsed it

学习git,但是坑好多,跳过一个又来一个。

首先Filename too long,通过设置core.longpaths搞定了,

然后之前尝试仅仅git add 一个文件的时候出现Warning: LF will be replaced by CRLF ,通过config core.autocrlf解决了。

之后第二次git add . 还需要删除.lock文件。

但是现在git add . 大半天没有反应这是出现什么情况都不知道,没有解决的头绪。就算文件很多也不可能二十来分钟还没好吧?因为我已经新建了.gitignore文件忽略了node_modules了啊。

然后git.exe占用内存爆炸。

git add .老半天没反应

git add .老半天没反应

怎么现在能胡乱编辑自己的问题了- -真是。

回复内容:

学习git,但是坑好多,跳过一个又来一个。

首先Filename too long,通过设置core.longpaths搞定了,

然后之前尝试仅仅git add 一个文件的时候出现Warning: LF will be replaced by CRLF ,通过config core.autocrlf解决了。

之后第二次git add . 还需要删除.lock文件。

但是现在git add . 大半天没有反应这是出现什么情况都不知道,没有解决的头绪。就算文件很多也不可能二十来分钟还没好吧?因为我已经新建了.gitignore文件忽略了node_modules了啊。

然后git.exe占用内存爆炸。

git add .老半天没反应

git add .老半天没反应

怎么现在能胡乱编辑自己的问题了- -真是。

学习的话建议在 linux 上用 git,实在没有的建议转个最新版本的window 版 git

  1. LF 是linux上文本文件的换行符, CRLF是 window 上的,git 在window上 git 检入检出的时候会根据设置确定是否转换。git 安装的时候也会有提示。

  2. window 曾经,一个路径不能超过 256 个字符(总长度不仅仅是文件名)。

  3. 不建议直接 git add . 。 node_module 为什么要要加到进去? 忽略掉吧,npm2 及一下,会创建很深的目录层次(每个文件还都特别小,复制都要好长时间),git 添加比较费时间。

  4. 64 位的系统,为什么是 32 位的 MINGW?

P.S. 编辑别人的问题,提交之后显示的是你的名字。相当于你重新提交了一个新的问题,方便用户基于别人的问题/评论创建自己的问题。(难道这是新功能????,不怕别人乱搞,就好像现在,我不是作者本人,也可以编辑你的答案。)

Windows上建议使用github的git shell:
https://desktop.github.com/

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!