zoukankan      html  css  js  c++  java
  • vue框架前后端分离项目之git的使用等相关内容-119

    0 过滤文件

    1 https://bitbucket.org/  ,github,gitee,gitlab
    2 项目中加过滤文件,加了以后,被排除的文件或文件夹不被git管理
    3 在项目路径下新建 .gitignore 文件(写过滤规则)
    - #表示注释
       -忽略某个文件夹(写文件夹名字)    node_modules
       -忽略某个文件(直接写文件名)     .DS_Store
    -忽略以npm-debug.log开头的所有文件  npm-debug.log*
       -忽略所有后缀名为.sln的文件        *.sln
       
    4 自己写.gitignore
    -在windows平台写成 .gitignore.   其它平台不用
       -.gitignore文件需要被git管理
       
    5 自己写的
    xxx   # 忽略这个文件夹
    tt.txt # 忽略这个文件
    /aaa/aa.txt # 忽略这个文件夹下的文件
    *.json  # 忽略以json结尾的所有文件

    1 远程仓库

    1 github gitee gitlab
    2 创建仓库,单分支,不使用readme初始化仓库

    3 操作步骤
    cd luffyapi
    git init
    git add .
    git commit -m "first commit"
    git remote add origin https://gitee.com/liuqingzheng/luffyapi_s15.git
    git push origin master
    # 输入用户名密码,提交上去

    4 其它命令
    """
    1)查看仓库已配置的远程源
    >: git remote
    >: git remote -v

    2)查看remote命令帮助文档
    >: git remote -h

    3)删除远程源
    >: git remote remove 源名
    eg: git remote remove origin

    4)添加远程源
    >: git remote add 源名 源地址
    >: git remote add orgin git@gitee.com:doctor_owen/luffyapi.git

    5)提交代码到远程源
    >: git push 源码 分支名

    6)克隆远程源
    >: git clone 远程源地址
    """


    连接远程仓库的两种情况

    1 首次提交代码连接
    cd luffyapi
       git init
       git add .
       git commit -m "first commit"
       git remote add origin https://gitee.com/liuqingzheng/luffyapi_s15.git
       git push origin master
    2 作为参与开发者,操作远程
    git clone https://gitee.com/liuqingzheng/luffyapi_s15.git
       # 使用pycharmn打开项目(直接使用pycharm拉取项目)
       
    3 开发了,更改文件
    -张三和李四协同开发
       -假设张三提交了代码
       -李四在提交之前需要先(以后你们每次提交代码之前,都需要先拉取:拉取可能会出冲突)
      git pull origin master  # 拉取,拉到最新版本
           

     

    2 冲突出现原因及解决

    1 多个人在同一个分支上修改了同一段代码出现冲突
    <<<<<<< HEAD
    我的代码
    =======
    对方的代码
    >>>>>>> 04f13e850419b39610b81cb13eb8be91c6b3386b

     

     

  • 相关阅读:
    url 转码 urlencode和 urldecode
    通过启动函数定位main()函数
    关于溢出的总结1
    http://ctf.bugku.com/challenges#Mountain%20climbing:bugku--Mountain-Climbing
    http://ctf.bugku.com/challenges#love:bugku--love
    http://ctf.bugku.com/challenges#%E9%80%86%E5%90%91%E5%85%A5%E9%97%A8:bugku--逆向入门
    http://ctf.bugku.com/challenges#Timer(%E9%98%BF%E9%87%8CCTF):Bugku——Timer(阿里CTF)
    http://ctf.bugku.com/challenges#%E6%B8%B8%E6%88%8F%E8%BF%87%E5%85%B3--游戏过关
    填坑专记-手脱FSG壳

  • 原文地址:https://www.cnblogs.com/usherwang/p/14189598.html
Copyright © 2011-2022 走看看