zoukankan      html  css  js  c++  java
  • 如何将本地仓库上传到github,以及工作的情况

    1.安装git

    选择你喜欢的盘,傻瓜式安装

    2.github

    http://github.com

    注册一账号 登录

     

    3.github创建仓库

    1.右上角 有个 + ,点开,选择 new repository

    2.输入仓库名称 和描述,创建

     

    4.将项目添加到本地仓库中

    在你的项目中右键 -》git bash here

    git add .  //添加所有文件
    git commit -m "你的本次做了什么事情"
    //如果是第一次使用git 需要配置一下个人信息
    //git config --global user.email "11@qq.com"
    //git config --global user.name "haomeili"

    5.连接远程仓库

    git remote add origin 你的仓库地址http://...

     如果出现:

    $ git remote add origin 你的仓库地址http://...

    fatal: remote origin already exists.

    就先移除当前的连接:

       git remote rm origin

    再重新连接

       $ git remote add origin 你的仓库地址(http://...)
    往下依次执行

    推送到远程仓库

    git push -u origin master

    询问你的github的账号和密码,输入即可

    6.down项目

    git clone 你的仓库地址(http://...)

    7.下班

    git add . 
    git commit -m "描述"

    git pull //如果一旦有变化,那么需要重新 add commit pull
    git push

    8.上班

    git pull

     

  • 相关阅读:
    P2494 [SDOI2011]保密 最小割
    P2765 魔术球问题
    [CTSC2008]祭祀river
    CF311E Biologist
    P4177 [CEOI2008]order
    函数的形参和实参
    python字符编码
    源码安装Vim并配置YCM自动补全插件
    Python基础练习之购物车
    Python字符串的所有操作
  • 原文地址:https://www.cnblogs.com/ximenchuifa/p/13823487.html
Copyright © 2011-2022 走看看