zoukankan      html  css  js  c++  java
  • git上传文件方法

    背景:github是一个非常好用的代码仓库,上面可以看到很多大佬写的代码基本都是开源的,我们一般使用Jenkins持续构建的时候会调用git的脚本,所以首先我们需要将本地的代码提交到git仓库
        首先需要官网https://git-scm.com/下载对应客户端安装包进行安装,然后需要在https://github.com/注册一个账号 1.第一次提交git代码方法,需要在你需要上次文件的地方初始化,初始化后会生成一个.git的文件,然后就可以使用cmd进入该文件夹下进行对应操作
      第一步 git init  
      第二步 git add *
      第三步 git commit -m "备注修改记录"
      第四步 git config --global user.email "you@example.com"
      第五步 git config --global user.name "Your Name"
      第六步 git remote add origin https://github.com/13058038021/jack
      第七步 git push -u origin master
    
    2.后续日常更新代码方法就比较简单了
      第二步 git add *
      第三步 git commit -m "备注修改记录"
      第一步 git pull
      第四步 git push origin master
    
    3.其他常用方法
      1)遇到提出重复:    git remote rm origin
      2)从git克隆到本地: git clone https://github.com/13058038021/jack
      3)创建分支:        git checkout -b dev
      4)查看当前分支:    git branch 
      5)切换分支        git checkout master
  • 相关阅读:
    自己搭建二维码接口
    HTML CSS SPRITE 工具
    Codeforces Round #636 (Div. 3) 题解
    Codeforces Round #612 (Div. 1+Div. 2)
    计树问题小结 version 2.0
    Educational Codeforces Round 85 (Rated for Div. 2) 题解
    luogu6078 [CEOI2004]糖果
    luogu [JSOI2012]分零食
    多项式全家桶
    生成函数小结
  • 原文地址:https://www.cnblogs.com/onelove1/p/13127652.html
Copyright © 2011-2022 走看看