zoukankan      html  css  js  c++  java
  • git使用记录

    从online拉取分支

    git clone -b online  project.git 单独克隆某一分支

    cd project

    git checkout -b feature/we-mine(任务号)  origin feature/we-mine 获取we-mine分支到本地并自动建立track

    git pull feature/we-mine

    提交修改

    git add .(或者单个文件)

    git commit -m 'add toast'

    git push origin feature/we-mine

    gitlab手动合并到develop分支 发起merge请求

    如果有冲突 切记不要在gitlab上修改

    git checkout develop

    git pull develop

    手动解决冲突

    执行‘提交修改操作’

    git checkout feature/we-mine

    切换到某一个tag版本

     git tag -l 列出全部的tag清单
     git checkout <tag_name>

    查看分支

    git branch

    修改分支名称

    git branch -m oldbranch newbranch

    git推送本地分支到远程分支

    通常情况下,在项目中需要单独开发一个分支

    开发分支的两种方式

    1.远程开好分支,直接拉到本地

    git checkout -b feature-branch origin/feature-branch //检出远程的feature-branch分支到本地

    2.本地开好分支,推送到远程

    git checkout -b feature-branch //创建并切换到分支feature-branch 

    git push origin feature-branch:feature-branch //推送本地的feature-branch(冒号前面的)分支到远程origin的feature-branch(冒号后面的)分支(没有会自动创建)

    强势上推

    git push -f git地址 feature/we-mine

    同理 git checkout -f feature/we-mine

    删除不要文件

    rm 文件名

    上线

     git checkout online

     git pull

    git checkout feature/we-mine

    git merge online

    git status

    git add .

    git commit -m'注释'

    git push origin feature/we-mine

    gitlab 手动申请合并

    打tag,名称即为任务号

    转EBS

    请求经理审批上preview环境测试

     preview环境测试

    点击preview测试通过

    经理点击上线

    一点一滴累积,总有一天你也会成为别人口中的大牛!
  • 相关阅读:
    LC.225. Implement Stack using Queues(using two queues)
    LC.232. Implement Queue using Stacks(use two stacks)
    sort numbers with two stacks(many duplicates)
    LC.154. Find Minimum in Rotated Sorted Array II
    LC.81. Search in Rotated Sorted Array II
    LC.35.Search Insert Position
    前后端分离:(一)
    Redis基本使用(一)
    GIT篇章(二)
    GIT篇章(一)
  • 原文地址:https://www.cnblogs.com/fancyLee/p/8298414.html
Copyright © 2011-2022 走看看