zoukankan      html  css  js  c++  java
  • 在windows下使用TortoiseGit提交代码到github

    一、安装git工具

    在windows下使用git最好的软件就是TortoiseGit,类似与TortoiseSVN小乌龟。

    下载地址:https://code.google.com/p/tortoisegit/

    安装顺序: recommended order: install TortoiseGit first

    ——先安装TortoiseGit,再安装msysgit

    https://code.google.com/p/msysgit/

    安装完之后使用git bash.

    git bash是Windows下的命令行工具。

    基于msys GNU环境,有git分布式版本控制工具,也主要用于git。

    二、关于git和github的一些概念

    repository [ri'p?zit?ri]  知识库,版本库,代码库

    collaborate [k?'l?b?ret] 合作,协作,协同

    git 是一个快速高效的、分布式的版本控制系统,完美适用于协作式软件开发。

    github 是与其他人协作做好的方式。

    fork 分支

    brunch 分支

    三、向github中托管代码

    1.set up git

    1.配置Username和Email

    git config --global user.name "Your Name Here"

    git config --global user.email "your_email@example.com"

    2.配置git和gitbash可以正常显示中文

    http://blog.csdn.net/son_of_god/article/details/7341928

    2.create a repo

    首先在github上新建一个repo,如 MyTools,然后在git bash中操作

    mkdir MyTools

    cd MyTools

    git init

    touch README

    --edit README file

    git add README

    git commit –m 'the first commit for git'

    git remote add origin https://github.com/FrankFan/MyTools.git

    git push origin master

    说明:

    touch和cat的区别

    cat 一般是用来查看文本文件内容
    touch
    可以新建一个空文件,可以修改文件的创建时间

    update 2013-05-17

    1.如果要删除一个文件,使用

    git remove READ

    删除之后再git add <file>则不会在索引中删除这个文件,必须通过使用-a选项的命令:

    git commit -a -m 'now file READ is removed'

     2. git clone
    把github上的源代码库拷贝到本地:

    git clone https://github.com/FrankFan/DatabasePicExporter

     

  • 相关阅读:
    JSTL标签用法
    (转)javascript正则实战
    Spring中几种数据源的配置
    (转)常用正则表达式
    EL表达式详解
    JAVA环境变量配置(转)
    S2SH整合步骤
    正则表达式30分钟教程(转)
    在Flash Player 10.2中使用原生鼠标指针
    time
  • 原文地址:https://www.cnblogs.com/fanyong/p/2952868.html
Copyright © 2011-2022 走看看