zoukankan      html  css  js  c++  java
  • git使用安装实战


    安装环境:Windows 

       

      1 安装msysgit

      进入到http://code.google.com/p/msysgit/

      下载Git-1.7.60preview20110708.exe版本

       

      按默认安装

       

      2 安装TotoiseGit

      http://code.google.com/p/tortoisegit/downloads/list

      下载 最新版本,并安装

       

      3 设置个人信息

      开始--所有程序--TotoiseGet--Setting

      Git--config

      填写UserInfoNameEmail

       

      4 基本的TotoiseGit使用和TotoiseSVN一样

      建议试试下载

      git://github.com/antirez/redis.git

      这个代码来试试

       


       

       

      5 创建GitHub账号:

      https://github.com/

      GitHub可以托管各种git库,并提供一个web界面,功能和google-code差不多

       

      以下步骤参考http://help.github.com/win-set-up-git/

       

      6 创建SSH Key,并增加SSH Key

       

      创建:

      ssh-keygen -t rsa -C "your_email@youremail.com"

      按照提示一步步走,直到提示:

      Your public key has been saved in /c/….

       

      增加ssh key

      On the GitHub site Click “Account Settings” > Click “SSH Public Keys” > Click “Add another public key”

       

      key这个字段中填写

      id_rsa.pub文件中的内容

      id_rsa.pub目录是在刚刚存放的.ssh目录(这是个隐藏目录)中

       

      测试是否已经安装完成了

      ssh -T git@github.comAttempts to ssh to github

       

      7建立个人信息


      其中的usertoken是你在github上的用户名和token

       

      8 创建Repo

      进入:https://github.com/repositories/new

      填写需要填写的字段

       

      提交后进入新页面

      按照提示创建一个测试gitrepro

      mkdir testgithub

        cd testgithub

        git init

        touch README

        git add README

        git commit -m 'first commit'           //git提交

        git remote add origin git@github.com:jianfengye/testgithub.git   //github上增加一个Repo

        git push -u origin master    //将文件上传
       

      9 创建一个项目的分支

      Spoon-Knife为例子

      git clone git@github.com:username/Spoon-Knife.git   //复制这个项目

      $ cd Spoon-Knife

      $ git remote add upstream git://github.com/octocat/Spoon-Knife.git  //加入分支upstream

      $ git fetch upstream  //获取分支upstream

      $ git push origin master  //上传本地文件

       

      -------------------------

      参考地址:

      http://help.github.com/

      http://baike.baidu.com/view/3366456.html?fromTaglist

      http://code.google.com/p/tortoisegit/downloads/list

      http://wenku.baidu.com/view/730e56896529647d2728520d.html?from=related&hasrec=1


      ---------------------- 

    作者:yjf512(轩脉刃)

    出处:http://www.cnblogs.com/yjf512/

    本文版权归yjf512和cnBlog共有,欢迎转载,但未经作者同意必须保留此段声明

    实时了解作者更多技术文章,技术心得,请关注微信公众号“轩脉刃的刀光剑影”

    本文基于署名-非商业性使用 3.0许可协议发布,欢迎转载,演绎,但是必须保留本文的署名叶剑峰(包含链接http://www.cnblogs.com/yjf512/),且不得用于商业目的。如您有任何疑问或者授权方面的协商,请与我联系

  • 相关阅读:
    echarts动态设置主体颜色
    spring security session
    Spark RDD函数:
    MapReduce TOP n
    feign 使用示例
    trie树
    动态修改注解(annotation)值
    golang插件
    Kafka Streams Example
    tcp并发(c18w)
  • 原文地址:https://www.cnblogs.com/yjf512/p/2362992.html
Copyright © 2011-2022 走看看