zoukankan      html  css  js  c++  java
  • 用到的 git 命令

    1.创建分支

      git branch branch_name

    2.删除分支

      1).删除本地分支

      git branch -D branch_name

      2).删除远程分支

      git push orgin :branch_name

    3.切换分支

      git checkout branch_name

    4.将本地分支分布到服务端

      git push orgin branch_name

    5. 把本地代码推送到远程仓库

      1). 先进行本地仓库初始化 git init

      2). 提交代码到本地仓库  git commit .

      3). 添加远程仓库地址 git remote (alais name) (remoteUrl) eg:git remote remote_rep https://git.oschina.net/xxx.git

      4). 推送数据到远程仓库 git push -u (alais name) (branch name)

        eg: git push -u remote_rep master

        Ps:默认新仓库分支名称是master,一般都是会重复 请使用其他名字; -u 必须添加 

  • 相关阅读:
    Python 集合
    Python 文字列
    JUNIT5(maven配置)
    Javascript严格模式
    移动互联测试
    Python的基础知识
    Linux系统下发件oa环境
    禅道的使用
    Linux系统的安装过程
    Oracle基础知识
  • 原文地址:https://www.cnblogs.com/lyzblog/p/4689166.html
Copyright © 2011-2022 走看看