做项目初次用到Git,以前没用过,完全没不懂,琢磨了好久才弄得差不多,特此分享,可以少走点弯路。
这次用的操作系统是Mint
1.首先需要安装Git
sudo apt-get install git
2.在本地新建Git仓库
新建一个文件夹,然后文件夹中打开终端,输入命令git init,即可创建一个仓库
3.连接Git服务器
这次我们用的服务器是http://git...
分类:
其他好文 时间:
2015-04-11 22:39:58
阅读次数:
188
1. 设置git的本地配置信息git config --global user.name ""git config --global user.email ""git config --global alias.co checkout #设置命令别名git config --global ali.....
分类:
其他好文 时间:
2015-04-10 20:01:26
阅读次数:
131
git是个分布式的版本管理工具,现在我们前端这边用它做版本管理。之前也看过一些相关资料,不过没有使用它管理过项目代码。如今,用它也有段时间了所以就写些东西,仅供参考。###快速上手工作经常用到的几个git命令:1. git clone 版本库地址 克隆远程版本库到本地2. git checkou.....
分类:
其他好文 时间:
2015-04-09 11:47:52
阅读次数:
100
在连接Git服务器的过程中,可能出现fatal protocol error bad line length character: micr的错误。原因是Git服务器搭建时,选择错误的协议了,不要选Windows Shell,选择
Linux shell and Sftp即可。...
分类:
其他好文 时间:
2015-04-07 21:41:56
阅读次数:
197
使用的是win7下的git安装就不赘述了下面的文档说的很详细Git客户端图文详解如何安装配置GitHub操作流程攻略 http://www.ihref.com/read-16377.html到下面这一步时要选择第二个,这样右键会有git选项配置SSHkey创建本地sshssh-keygen -t r...
分类:
其他好文 时间:
2015-04-05 23:09:33
阅读次数:
191
最近准备给同事培训git,发现了一个不错的资源,在这里:http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/原文如下,有空再译:ommands discussed in thi...
分类:
其他好文 时间:
2015-04-01 16:48:01
阅读次数:
157
git config --global alias.st statusgit config --global alias.ci commitgit config --global alias.co checkoutgit config --global alias.br branch之后的git s...
分类:
其他好文 时间:
2015-03-31 12:31:59
阅读次数:
143
当我们使用Git push推送到github上时 报错 "error: failed to push some refs to " 解决方法:
使用git pull 然后再git push
玩了一晚上的git现在来总结一下:
用户设置
$ git config --global user.name "Your Name"
$ git config --global user....
分类:
其他好文 时间:
2015-03-22 09:08:56
阅读次数:
201
# Local per-repo rules can be added to the .git/info/exclude file in your # repo. These rules are not committed with the repo so they are not shared # with others. This method can be used for local...
分类:
其他好文 时间:
2015-03-20 11:12:29
阅读次数:
150
.gitignore 中添加的文件不能被忽略掉 这是因为我们误解了.gitignore文件的用途,该文件只能作用于Untracked Files,也就是那些从来没有被 Git 记录过的文件(自添加以后,从未 add 及 commit 过的文件)。 之所以你的规则不生效,是因为那些.log文件曾经.....
分类:
其他好文 时间:
2015-03-19 19:56:00
阅读次数:
140