zoukankan      html  css  js  c++  java
  • git for windows+TortoiseGit客户端的使用

        一、安装Git客户端

                全部安装均采用默认!

               1. 安装支撑软件 : https://code.google.com/p/msysgit/downloads/list?q=full+installer+official+git     

    各项全选:

                      

    选第三项使用unix命令:run git and included unix tools from windows command prompt

       

    选第一项:检出CRLF->LF, 检入LF->CRLF

    安装git for windows好,可使用C:Program Files (x86)Gitin目录下命令工具:

    antiword.exe
    astextplain
    awk
    basename.exe
    bash.exe
    bison.exe
    bunzip2
    bzip2.exe
    c_rehash
    cat.exe
    chmod.exe
    clear
    cmp.exe
    connect.exe
    cp.exe
    curl-ca-bundle.crt
    curl.exe
    cut.exe
    date.exe
    diff.exe
    dirname.exe
    docx2txt
    dos2unix.exe
    du.exe
    echo
    egrep
    env.exe
    expr.exe
    false.exe
    find.exe
    flex.exe
    gawk.exe
    getcp.exe
    git.exe
    gitk
    gpg-zip
    gpg.exe
    gpgkeys_curl.exe
    gpgkeys_finger.exe
    gpgkeys_hkp.exe
    gpgkeys_ldap.exe
    gpgsplit.exe
    gpgv.exe
    grep.exe
    gunzip.exe
    gzip.exe
    hd2u.exe
    head.exe
    iconv.exe
    id.exe
    kill.exe
    less.exe
    libW11.dll
    libapr-0-0.dll
    libaprutil-0-0.dll
    libcrypto.dll
    libcurl.dll
    libexpat-0.dll
    libgsasl-7.def
    libgsasl-7.dll
    libiconv-2.dll
    libintl-8.dll
    libneon-25.dll
    libpoppler-7.dll
    libssl.dll
    libsvn_client-1-0.dll
    libsvn_delta-1-0.dll
    libsvn_diff-1-0.dll
    libsvn_fs-1-0.dll
    libsvn_fs_fs-1-0.dll
    libsvn_ra-1-0.dll
    libsvn_ra_dav-1-0.dll
    libsvn_ra_local-1-0.dll
    libsvn_ra_svn-1-0.dll
    libsvn_repos-1-0.dll
    libsvn_subr-1-0.dll
    libsvn_swig_perl-1-0.dll
    libsvn_wc-1-0.dll
    libz.dll
    ln.exe
    ls.exe
    m4.exe
    md5sum.exe
    mkdir.exe
    msmtp.exe
    msys-1.0.dll
    msys-crypto-1.0.0.dll
    msys-minires.dll
    msys-perl5_8.dll
    msys-regex-1.dll
    msys-ssl-1.0.0.dll
    msys-z.dll
    msysltdl-3.dll
    mv.exe
    openssl.exe
    patch.exe
    patch.exe.manifest
    pdfinfo.exe
    pdftotext.exe
    perl.exe
    printf
    ps.exe
    pthreadGC2.dll
    pwd
    rebase.exe
    recodetree
    rm.exe
    rmdir.exe
    rxvt.exe
    scp.exe
    sed.exe
    sh.VisualElementsManifest.xml
    sh.exe
    sleep.exe
    sort.exe
    split.exe
    ssh-add.exe
    ssh-agent.exe
    ssh-keygen.exe
    ssh-keyscan.exe
    ssh.exe
    start
    tail.exe
    tar.exe
    tcl85.dll
    tclpip85.dll
    tclsh.exe
    tclsh85.exe
    tee.exe
    tk85.dll
    touch.exe
    tr.exe
    true.exe
    txt.txt
    uname.exe
    uniq.exe
    unix2dos.exe
    unzip.exe
    vi
    vim
    vimtutor
    wc.exe
    which
    wish.VisualElementsManifest.xml
    wish.exe
    wish85.exe
    xargs.exe
    yacc

              2. 安装TortoiseGit

                  首先,要安装Windows Installer 4.5

                  然后,安装TortoiseGit-1.8.8.0-32bit.msi(当前最新版本)

     

                  最后,安装TortoiseGit中文语言包

                  TortoiseGit-LanguagePack-1.8.7.0-32bit-zh_CN.msi

        二、配置、使用TortoiseGit

               1. 设置为中文界面

               2. 建立版本库

                   在任意空的文件夹点击鼠标右键,选择“Git 在这里创建版本库”

               3. clone库

                   在上面的文件夹点击右键,选择“拉取(Pull)”

                   (1) 管理远端

    图2-3-1-1

    图2-3-1-2

                   其中,URL是远端版本库的git地址

                  注意,一定要把“localhost”改成IP地址,否则会出现如下错误:git did not exit cleanly (exit code 128)

                   (2) 生成PPK文件

                         在“开始”菜单,选择“TortoiseGit”中的“PuttyGen”

                      点击“Generate”按钮,然后,鼠标在图中红色方框的区域内不停的移动,即可生成密钥。

                    点击“Save private key”按钮,把生成的密钥保存为PPK文件。

                     确定生成。

                    保存到图2-3-1-2中的地址

                     (3) 完成clone库

                4. 提交本地版本库

                   在本地版本库中新建立的文件图标均为

                   (1) 添加到本地库

                              鼠标右键点击如上图图标的文件,选择“增加”

                               这时,文件图标变为表示添加到本地库成功。

                   (2) 提交到本地库

                               鼠标右键点击如上图图标的文件,选择“Git提交(C) ... -> "master"...”

                         会出现提示,设置用户名和邮箱。

                          设置用户名、邮箱和签名密钥(PPK文件)

                         输入日志信息,完成提交。

               5. 推送本地库到服务器

                   如果所有文件夹和文件的图标都如图所示,那么我们就可以把本地库推送到版本服务器了。

                   在本地库所在根目录(本机为D:mydoc13ssfc),点击鼠标右键,选择“TortoiseGit”-〉“推送”

                       完成推送。

    ------------------------------------------xiaobin_hlj80-----------------------------------------------全文End------------------------------

            FAQ:

                  1. 关于:用户名和邮箱

                      用户名和邮箱,都是由版本服务器分配。就是我们在版本服务器建立用户名和邮箱,然后在客户端使用。

                  2. 取消上次的“Commit”操作

                      右击git库文件夹,选择“Git”选项卡,点击“Show log”按钮,选择要回滚的位置,点击右键选择“Reset "master" to this...”

                      点击“ok”完成取消操作。

  • 相关阅读:
    Thread.Sleep(0)的作用
    javascript form提交 不执行onsubmit事件解决方案
    获取控件生成的html
    (诡异事件)iframe标签后面的alert不执行
    数据重复插入的问题
    aspnetpager bug
    晒一下我的数据访问层接口
    Jquery.ajax不能解析json对象,报Invalid JSON错误的原因和解决方法(转)
    火狐对ajax的onreadystatechange与IE的不同。
    一个命名的问题把我给折腾的
  • 原文地址:https://www.cnblogs.com/timssd/p/5848893.html
Copyright © 2011-2022 走看看