• 利用GIt命令上传项目到GitHub指定仓库


    1.建立GIt可管理的仓库

    cd到本地项目根目录下,执行 git init 命令:

      git init

    2.将项目的所有文件添加到仓库中(注意add后面有一个“ . ”)

      git add .

    3.将上一步add的文件commit到仓库

      git  commit -m "提交的说明注释"

    4.到GitHub官网新建一个仓库(Create repository),复制仓库地址

    5.将本地仓库关联到GitHub新建的仓库上

      git remote add origin https://github.com/Love-LG/Javaweb-firstcup-war

    6.使用pull命令

      git pull origin master

    7.将本地仓库的文件上传到GitHub远程仓库

      git push -u origin master

    如果github上有新的文件,要先下载下来,再push:

      git pull --rebase origion master

    8、切换用户: git clone -b branch_name http://xxx  (-b指分支)

          cd branch_name

     再执行push操作

     9、git新建分支并提交本地代码到远程分支

      step1,在本地新建分支

          git branch newbranch

      step2:把本地分支push到远程

        git push origin newbranch

      step3:切换到该分支

        git checkout newbranch

      step4:查看本地修改

        git status

      step5:添加本地修改

        git add .

      step6:commit修改

        git commit -m 'XXXX'

       step7:push代码

        git push

     

    转载:https://www.cnblogs.com/yuanchao-blog/p/10547945.html

  • 相关阅读:
    《PS技巧精华全部在这里!》
    c#的dictionary为什么在扩容时会以素数扩容
    初识Lua
    常用的排序
    像gal一样讲故事~
    打枪的实现
    武器的方向,人物和武器的翻转
    虚拟摇杆的修改
    实现虚拟摇杆的移动
    itemPool和MessageCenter
  • 原文地址:https://www.cnblogs.com/rrl92/p/11236924.html
Copyright © 2020-2023  润新知