zoukankan      html  css  js  c++  java
  • git第九节---git命令实战

    1. git 项目创建

       mkdir git-command 

     2.git 配置

     git config --list 

    配置用户名 邮箱

    git config user.name 'XXX'  --local

    git config user.password  'XXX'  --local

    git config --global alias.st status

     3.初始化成git 项目

     git init 

    远程建立连接

    git remote add 远程连接地址

    git remote -v

    4. 添加.gitignore文件 (忽略文件)

    5.添加README.md (项目说明文件)

      正常开发联调项目使用

     (1)建立个人分支

      1文件新增,编辑,删除

      创建分支 dev : git branch dev

      2.状态查看 git status

      3.添加文件到暂存区 git add

     4.提交到暂存区 git commit 

     5.推送 git push

     6.上线打tag 

    git tag -a v0.1.0 -m 'XXX'

    gut  push --tag 

      hotfix修复问题

      切换新的分支 git checkout -b

         删除本地分支: git checkout -d XXXX(分支名称)

         删除远端分支: git push origin -d XXXX(分支名称)

      问题修复 

     代码提交

     代码合并

    git  merge  dev 

     重新打tag

     存储未添加到暂存区的文件

     git stash (回复到最近一次提交的内容)

     多人协同开发

    远端会出现多个不同的开发分支

    拉取远程公共分支

    合并到本地分支

    解决冲突

    提交

    推送

  • 相关阅读:
    TopShelf注册win10 服务
    win 10服务简单注册
    关于Win10 的服务注册
    泛型 Generic
    数据转换成字符串格式
    蛋白粉怎么吃
    6 ways to Sort Pandas Dataframe: Pandas Tutorial
    GET and POST requests using Python
    python中安装包出现Retrying, 国内pip源提示“not a trusted or secure host”解决
    Anaconda 4.7.5
  • 原文地址:https://www.cnblogs.com/kkz-org/p/9362992.html
Copyright © 2011-2022 走看看