zoukankan      html  css  js  c++  java
  • 在GitHub上创建代码仓库

    目前在GitHub上管理托管带代码的人越来越多了,今天也尝试了一次,顺便记下来,备用。


    首先是在GitHub上创建一个代码仓库,创建完之后,GitHub上会有提示,这时进入项目目录执行下面的命令,顺便提一下,如果你的项目从未添加过,在执行git commit之前先执行 git add .  这样把代码就会加入追踪里面。

    Create a new repository on the command line

    touch README.md
    git init
    git add README.md
    git commit -m "first commit"
    git remote add origin https://github.com/lltppong-it/TeweWater.git
    git push -u origin master

    Push an existing repository from the command line

    git remote add origin https://github.com/lltppong-it/TeewWater.git
    git push -u origin master

    创建了仓库,如果不想要了的删除方法  

     Account Settings -->  Repositories -->  左边的 Settings —> 最下面 有一个 Delete this Repositories


    在GitHub上创建的仓库都是public的,除非你付费。在OSChina上可以创建private的仓库
    点击+可以创建新项目,然后按照上面说明,添加仓库. 其中是你创建项目的时候就会有的一个地址,直接换成OSChina的就可以
    https://github.com/lltppong-it/TeweWater.git
    在管理  --> 项目设置 里面可以删除项目
    如果创建的代码仓库里面添加了README.MD 和 LICENSE,文件建议先执行 git pull origin master,将这些文件pull下来,然后在 push

    Git 修改默认的编辑器
    git config --global core.editor vim
    global修改的是~/.gitconfig,将默认编辑器改为Vim, 且只对当前用户有效

  • 相关阅读:
    教师派10
    教师派9
    简单理解socket(AF_INET&SOCK_STREAM,SOCK_DGRAM)
    Deepin安装MySQL(MariaDB)不提示设置密码问题(密码为空)
    经典排序算法-附python代码
    Linux虚拟环境virtualevn
    linux安装虚拟环境
    deepin安装虚拟环境virtualenv
    deepin安装虚拟环境virtualenv
    把握AFNet网络请求完成的正确时机
  • 原文地址:https://www.cnblogs.com/wuyida/p/6300604.html
Copyright © 2011-2022 走看看