git处理时的问题
1. 在node.js开发的时候常常会遇到从别人的远程仓库中clone时出现文件名过长的错误,
或则是在本地npm下载之后的文件进行上传到自己的远程仓库的时候会出现 File too long的情况,这个时候(例如:mongoose的模块,less模块)
可以在git bash中先运行下面这行命令:
git config --global core.longpaths true,
这样基本上可以解决问题。
2. 如果对于非必要处理的文件文件可以利用.gitignore文件来忽略文件的上传到git远程仓库,
具体介绍谷一下就行了,或则找一下度娘就解决。
3. npm下载或遇到下载不下来的时候可以考虑淘宝镜像cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
4. git提交的时候出现这种错误的时候:
“If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.”
解决方法:
git bash 中输入:rm -f ./.git/index.lock
5.git push 或者是 git pull 的时候出现下面报错
Could not read from remote repository.
Please make sure you have the correct access rights.and the repository exists.
出现这个问题可能是因为,没有在github账号添加SSH key,或是因为重装系统等原因导致密钥与公钥丢失。需重新创建密钥与公钥
解决方法:
打开git bash(不可以是windows系统的cmd命令行): ssh-keygen -t rsa -C "your_email@xxx.com"
之后创建的三个回车,
创建好后会默认在系统盘中创建一个公钥文件一般情况在 C:\Users\主机名\.ssh 文件夹下有一个这个 id_rsa.pub 文件
用记事本或者文本编辑器打开选中里面的所有内容 或者 命令行输入 pbcopy < ~/.ssh/id_rsa.pub 直接复制到剪切板上
然后到自己的github中设置中添加SSH keys
git处理时的问题的更多相关文章
- Git push 时每次都需要密码的疑惑
2015.1.13更新: 在本地搭建Git服务器时,也是有每次操作需要密码的情况. 是因为每次做推送动作时,Git需要认证你是好人.所以需要密码. 可以在 /home/username/.ssh/au ...
- 设置Git提交时不用输入用户名和密码
在用git提交时代码至github上时每次都要输入用户名和密码,当提交操作较为频繁时非常不方便,可以按下文中的介绍,设置成提交时不用输入用户名和密码: 1.在当前库下,已经运行过 git remote ...
- git clone时出现 error:inflate:data stream error(incorrect data check)
git clone时出现 error:inflate:data stream error(incorrect data check) fatal:serrious inflate inconsiste ...
- 执行Git命令时出现各种 SSL certificate problem 的解决办法
执行Git命令时出现各种 SSL certificate problem 的解决办法 来源 https://www.cnblogs.com/chenzc/p/5842932.html 比如我在win ...
- MAC OS 更新GIT版本时遇到的问题
在更新git版本时,没有备份就删掉了原先的版本,在安装完2.18.0的新版本后,使用命令行git --version,返回错误git not a developer tool or in PATH. ...
- git pull时解决分支分叉(branch diverged)问题
git pull时出现分支冲突(branch diverged) $ git status # On branch feature/worker-interface # Your branch and ...
- 解决git pull时出现的几个问题
第1个问题: 解决GIT代码仓库不同步 今天在执行git pull时出现: 解决方法:执行git checkout -f,然后再执行git pull重新checkout 再执行git pull时就可以 ...
- (诊断)git review时出现fatal: ICLA contributor agreement requires current contact information.错误
使用git review时出现错误: fatal: ICLA contributor agreement requires current contact information. Please re ...
- git push时提示"Everything up-to-date"
从github上git clone下的项目,添加或修改文件后,git push时出现"Everything up-to-date" , 即“一切都是最新的'. 通过 git s ...
- 如何修改git push时的密码
如何修改git push时的密码 如下: 打开git bash 输入 cd ~/.ssh ls 确定有 id_rsa 和 id_rsa.pub文件 ssh-keygen -p -f id_rsa 第一 ...
随机推荐
- SNE降维与可视化
from sklearn import datasets digits = datasets.load_digits(n_class=5) X = digits.data y = digits.tar ...
- bzoj 2179 FFT快速傅立叶 —— FFT
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2179 默写板子,注释的是忘记的地方. 代码如下: #include<iostream& ...
- Flutter实战视频-移动电商-51.购物车_Provide中添加商品
51.购物车_Provide中添加商品 新加provide的cart.dart页面 引入三个文件.开始写provide类.provide需要用with 进行混入 从prefs里面获取到数据,判断有没有 ...
- (2)ASP.NET Core 依赖关系注入(服务)
1.前言 面向对象设计(OOD)里有一个重要的思想就是依赖倒置原则(DIP),并由该原则牵引出依赖注入(DI).控制反转(IOC)及其容器等老生常谈的概念,初学者很容易被这些概念搞晕(包括我在内),在 ...
- 模板 - 洲阁筛 + min25筛
好像在某些情况下杜教筛会遇到瓶颈,先看着.暑假学一些和队友交错的知识的同时开这个大坑.
- Weekly Contest 111-------->944. Delete Columns to Make Sorted
We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose an ...
- Unity2016 Unity3D开发VR游戏的经验
http://z.youxiputao.com/articles/8313 在4月12日的Unite 2016大会上,暴风魔镜高级产品经理吴涛分享他用Unity3D开发VR游戏的经验,以下为分享实录: ...
- Go语言之父谈Go:大道至简
http://www.csdn.net/article/2012-07-05/2807113-less-is-exponentially-more 摘要:导读:这篇文章是Google首席工程师.Go语 ...
- bootstrap添加多个模态对话框支持
bootstrap添加多个模态对话框支持 (2015-03-04 21:05:35) 转载▼ 标签: 房产 因为项目需要,在页面交互上要弹出多个dialog窗口,而bootstrap的modal支 ...
- Integrated Metabolomics and Lipidomics Analyses Reveal Metabolic Reprogramming in Human Glioma with IDH1 Mutation (文献分享一组-黄旭蕾)
题目:Integrated Metabolomics and Lipidomics Analyses Reveal Metabolic Reprogramming in Human Glioma wi ...