Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1468664
  • 博文数量: 213
  • 博客积分: 10418
  • 博客等级: 上将
  • 技术积分: 3358
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-09 23:49
文章分类

全部博文(213)

文章存档

2014年(1)

2013年(5)

2012年(11)

2011年(2)

2010年(8)

2009年(26)

2008年(160)

分类: WINDOWS

2013-08-15 16:08:11

文档名称

Win7Git安装及配置过程

创建时间

2012/8/20

修改时间

2012/8/20

创建人

Baifx

简介(收获)

1、在win7上安装msysgit步骤;

2、在win7上安装TortoiseGit步骤;

3、在VS2010中集成Git方法和步骤。

参考源

Git的配置与使用


一、安装说明

1Gitwindows平台上安装说明。

         Git  Linux Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。目前Git已经可以在windows下使用,主要方法有二:msysgitCygwinCygwinLinux使用方法类似,Windows版本的Git提供了友好的GUI(图形界面),安装后很快可以上手,此处我们主要讨论基于msysgitGit安装和使用。

         TortoiseGitTortoiseSVNGit版本,TortoiseGit用于迁移TortoiseSVNTortoiseGit。一直以来GitWindows平台没有好用GUI客户端,现在TortoiseGit的出现给Windows开发者带来福音。我们将在64win7操作系统上安装Git,并使用GUI界面,则需同时安装msysGitTortoiseGit

2、阅读TortoiseGit官方安装说明:

System prerequisites

  • For the latest version of TortoiseGit Windows XP SP3 or newer is required.
  • Admin privileges for the installation
  •  is required by TortoiseGit
    • You do not need to download the whole msysGit development package, the  download package is sufficient
    • msysGit 1.7.10+ is recommended for TortoiseGit 1.7.9+ (msysGit 1.7.10 adds utf-8 support and is compatible to *nix git)
    • minimum compatible version is 1.6.1 (for TortoiseGit < 1.7.9 you should use msysGit 1.7.6)

Installation

Just  the setup package for your system and install it. If you are running a 64 bit system, you do not need to download and install the 32 bit version: The 32 bit shell extension is included in the 64 bit installer since TortoiseGit 1.7.3.0.

Windows 2000

If you want to use TortoiseGit in a Win2K environment (only 1.6.5 and below support Win2K), please install  before you install TortoiseGit. However, running these old versions is not recommended (no utf-8 and separate-git-dir support).

Upgrade

Before upgrading you should read the .

Just  the setup package for your system and install it. The old version will be replaced automatically.

If you are upgrading from 1.7.3.0 or older and you have installed the 32-bit version on a 64-bit system you have to deinstall the 32-bit version first.

Common problems (installer aborts with an error message)

"This installation package is not supported by this processor type. Contact your product vendor."

This means you are trying to install the 64-bit version of TortoiseGit on a normal 32-bit operating system. You need to download and use the correct msi file for your OS. For normal 32-bit OS, make sure the msi filename does not have "64-bit" in it.

"Please wait while the installer finishes determining your disk space requirements."

Cleanup/empty the temp-directory (e.g. C:\Users\\AppData\Local\Temp, C:\User and Settings\\Local Settings\Temp, c:\Windows\Temp\).

         由如上说明,我们寻找要下载的对应安装包,如下。

 

二、下载安装包

1TortoiseGit下载地址:

本次下载版本——TortoiseGit-1.7.12.0-64bit.msi 

TortoiseGit 1.7.12.0 64bit  

x64 Featured 

2msysgit下载地址:

本次下载版本——Git-1.7.11-preview20120710.exe 

Full installer for official Git for Windows 1.7.11  

Featured Beta 

 

三、安装过程

安装顺序:首先安装msysgit;然后安装TortoiseGit。

1、安装msysgit

a、安装包下载完成后,双击进入安装界面,如下图:

b、两步next后选择安装目录,如下图:

cnext进入Git安装模块选择,默认,如下图:

dnext进入Git setup界面,“Select start menu folder”,默认,如下图:

enext进入Git Setup界面,“Adjusting your PATH environment”,选择默认值“Use Git Bash only”,如下图所示:

fnext进入Git Setup界面,“Configuring the line ending conversions”,选择换行格式,选择“Checkout as-is, commit Unix-style line endings”,如下图所示:

gnext进入安装界面,完成安装,如下图所示:

这个时候已经可以使用git了, 打开Git Bash可以进入linux shell,可以使用git命令进行各种操作,由于大家都习惯使用图形界面的 TortoiseSVN,下面介绍使用 TortoiseSVN的类似软件 TortoiseGit,使用习惯相同,大家应该比较容易使用。

2、安装TortoiseGit

a、双击安装程序,进入安装界面,如下如所示:

b、两步next进入“Choose SSH Client”选择界面,选择“OpenSSHGit default SSH Client”,如下图所示:

cnext进入“Custom Setup”界面,选择默认值,如下图所示:

dnext,进入“Ready to Install”界面,选择“Install”按钮开始安装过程,完成安装。如下图所示:

e、至此,TortoiseGit安装完成。在桌面空白处点击右键,右键菜单中会加入TortoiseGit快捷键,如下图所示:

f、选择“Settings”,进入“Settings-TortoiseGit”界面,选择“General”选项卡,设置本机器的git路径,如下图所示:

g、同时选择“Network”选项卡,设置SSH路径。SSH默认在安装Git时就安装了,在如下图所示的路径中。如下图所示:

h、选择“Git”选项卡,设置用户名、邮箱和key。如下图所示:

注:如果暂时在本地使用就只需将用户名和邮箱添加,而“Signing key”会自动生成。

至此,TortoiseGit设置完成。

 

3、下载代码。

a、桌面空白处右键,选择git clone添加版本库地址URL和本地文件夹。如下图所示:

点击ok即可下载一份新版本库。

未完,待续。

 

 

 

 

 

 

四、在VS2010中集成Git

1、要想在Visual Studio中直接使用Git(即将Git集成到VS中)需要安装插件Git Source Control Provider,下载地址如下:

也可通过Visual Studio2010来下载安装。方法:在vs菜单中点击“工具”的“扩展管理器”,进入“扩展管理器”界面。在右上角搜索框中直接输入“Git”搜索,第一项即是“Git Source Control Provider”,然后点击“下载”,下载完成后直接安装,安装后重启VS2010即可。如下图所示:

2、安装过程。双击“GitSccProvider.vsix”,进入安装界面。如下图所示:

默认会勾选你所安装的Visual Studio的版本。点击“安装”按钮开始安装。安装完成后根据提示,关闭所有打开的Visual Studio实例,然后重新打开它们以使更改生效。

3、在Visual Studio实例中直接使用Git

阅读(7277) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~