git处理时的问题
2015-12-14 16:40
375 查看
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.org4. 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[/code]
相关文章推荐
- php数组函数-array_rand()
- 第十六周--验证算法(基数排序)
- OpenGL边用边学------2 经典照相机模型
- Oracle12c新特性之基本操作
- 运行时的“VFY: unable to resolve static field”错误
- 第7周项目4 队列数组
- autoencoder
- 窗口重叠,WS_CLIPCHILDREN和WS_CLIPSIBLINGS
- rpmbuild线上实战
- 第十六周项目(1):验证算法2——希尔排序
- 2743: [HEOI2012]采花
- Day1之OtherDemo
- (数据挖掘-入门-4)基于物品的协同过滤
- (数据挖掘-入门-3)基于用户的协同过滤之k近邻
- org.hibernate.exception.GenericJDBCException: could not load an entity:
- 关于perl缺少XML/LibXML.pm问题解决方法
- iOS-在Xcode中使用Git进行源码版本控制(一:Git源)
- CodeForces 375A Divisible by Seven
- iOS应用之间调用
- QTP自动化测试培训:描述编程之WebElement