当前位置: 首页 > news >正文

如何在yahoo上做网站免费seo网站自动推广

如何在yahoo上做网站,免费seo网站自动推广,网站建设空间是指什么,做购物网站赚钱吗调试笔记-系列文章目录 调试笔记-20240723-Linux-gitee 仓库同步 github 仓库,并保持所有访问链接调整为指向 gitee 仓库的 URL 文章目录 调试笔记-系列文章目录调试笔记-20240723-Linux-gitee 仓库同步 github 仓库,并保持所有访问链接调整为指向 gite…

调试笔记-系列文章目录

调试笔记-20240723-Linux-gitee 仓库同步 github 仓库,并保持所有访问链接调整为指向 gitee 仓库的 URL


文章目录

  • 调试笔记-系列文章目录
    • 调试笔记-20240723-Linux-gitee 仓库同步 github 仓库,并保持所有访问链接调整为指向 gitee 仓库的 URL
  • 前言
  • 一、调试环境
    • 操作系统:Windows 10 专业版
    • 调试环境
    • 调试目标
  • 二、调试步骤
    • 实现步骤
      • 1、github 上创建仓库
      • 2、在 github 仓库上创建 gitee 分支
      • 3、在 gitee 上导入 github 的仓库
      • 4、使用本工具完成 git 上 gitee 分支对 main 分支的同步
      • 5、gitee 仓库定期同步 github 仓库
    • 工作原理
  • 三、应用场景
    • gitee 仓库同步 github 仓库,并保持 URL 指向自己仓库的地址
  • 四、参考资料
  • 总结


前言

本文记录在 Windows 的 WSL 环境下使用 shell 脚本工具实现 gitee 仓库同步 github 仓库,并保持所有访问链接调整为指向 gitee 仓库的 URL。

实验使用的电脑如下:

CPU:

Intel Core i5 8265U

操作系统:

Microsoft Windows 10  Professional (x64), Version 22H2, Build 19045.4412

一、调试环境


操作系统:Windows 10 专业版

操作系统详细信息如下:

Microsoft Windows 10  Professional (x64), Version 22H2, Build 19045.4412

调试环境

  • Windows 系统下安装 WSL Ubuntu 22.04 LTS 版本,shell 脚本调试在此 WSL 环境中进行。

参考
【安装笔记-20240520-Windows-自定义 WSL2 安装位置】
【调试笔记-20240522-Windows-WSL 修改已安装发行版名称】


调试目标

实现 gitee 仓库同步 github 仓库,并保持所有访问链接调整为指向 gitee 仓库的 URL。

gitee 仓库:
在这里插入图片描述

github 仓库:

在这里插入图片描述


二、调试步骤

参考 【https://gitee.com/david921518/dev-tools/tree/gitee/github-merge】

实现步骤

以本仓库为例,实现 gitee 同步 github 的仓库,并保证访问 gitee.com 网站时所有 URL 调整到指向 gitee.com 的仓库路径

1、github 上创建仓库

github 上创建仓库后,默认生成 main 的主分支

2、在 github 仓库上创建 gitee 分支

gitee 分支用于给 gitee.com 的仓库访问,此分支上所有指向 github.com 仓库的 URL 都将修改为指向 gitee.com 的仓库

3、在 gitee 上导入 github 的仓库

导入 github 仓库后,在 gitee 的“管理”页修改默认分支为 gitee

4、使用本工具完成 git 上 gitee 分支对 main 分支的同步

5、gitee 仓库定期同步 github 仓库

工作原理

1、 本地主机上建立两个工作目录,/main/ 目录保存 github 仓库的 main 分支,/gitee/ 目录保存 github 仓库的 gitee 分支;

2、 更新 /main/ 目录后,使用字符串替换工具将指向 github.com 的 URL 修改为指向 gitee.com 的 URL

3、 复制修改后的 /main/ 目录文件内容到 /gitee/ 目录中

4、 将 /gitee/ 目录中的内容推送到 github 仓库的 gitee 分支

5、 触发 gitee.com 上对应的仓库进行 github.com 的仓库同步动作,实现两个 git 仓库同步

初始化工作目录的脚本 setup.sh 如下:


#!/bin/shgit clone -b main git@github.com:david921518/dev-tools.git main
git clone -b gitee git@github.com:david921518/dev-tools.git gitee
git clone -b gitlab git@github.com:david921518/dev-tools.git gitlab

URL 替换的脚本 replace_gitee.sh 如下:


#!/bin/sh# tested on Ubuntu 22.04github_url='https://github.com/david921518/dev-tools/blob/master'
gitee_url='https://gitee.com/david921518/dev-tools/blob/gitee'
ignore_files=("./github-merge/setup.sh" "./github-merge/replace_gitee.sh" "./LICENSE")rm -rf ./main_tmp
mkdir -p ./main_tmprm -rf ./gitee/*cp -af ./main/* ./main_tmp/
cp -af ./main/* ./gitee/# sed 's$https://github.com/david921518/dev-tools/blob/master$https://gitee.com/david921518/dev-tools/blob/gitee$' ./main/github-merge/README.md > ./gitee/github-merge/README.mdcd ./main_tmp/
files=$(find .)
cd ../for filename in $files
doif [ -f ./main_tmp/$filename ]; thenecho "./main_tmp/$filename is regular file"matched='false';for elem in "${ignore_files[@]}"; doif [[ "$elem" == "$filename" ]]; thenmatched='true';fidoneif [[ "$matched" == 'false' ]]; thenecho "replace $filename"sed "s^$github_url^$gitee_url^" "./main_tmp/$filename" > "./gitee/$filename"elseecho "ignore $filename"fielseecho "./main_tmp/$filename is not regular file"fi
donerm -rf ./main_tmp/# git commit to github
cd ./gitee/
git add *
git commit -a -m "merge with main branch"
git push origin gitee
cd ../

三、应用场景

gitee 仓库同步 github 仓库,并保持 URL 指向自己仓库的地址


四、参考资料

1、GitHub 分支合并工具

2、安装笔记-20240520-Windows-自定义 WSL2 安装位置

3、调试笔记-20240522-Windows-WSL 修改已安装发行版名称


总结

本文记录在 Windows 的 WSL 环境下使用 shell 脚本工具实现 gitee 仓库同步 github 仓库,并保持所有访问链接调整为指向 gitee 仓库的 URL。


文章转载自:
http://delomorphic.nLcw.cn
http://teleologist.nLcw.cn
http://relight.nLcw.cn
http://horseshoe.nLcw.cn
http://troy.nLcw.cn
http://huzoor.nLcw.cn
http://cunnilingus.nLcw.cn
http://cautioner.nLcw.cn
http://vicissitudinous.nLcw.cn
http://undercharge.nLcw.cn
http://overtrade.nLcw.cn
http://pole.nLcw.cn
http://microcurie.nLcw.cn
http://catalepsy.nLcw.cn
http://hypercatalexis.nLcw.cn
http://rhythmically.nLcw.cn
http://lmh.nLcw.cn
http://esperance.nLcw.cn
http://umb.nLcw.cn
http://lipin.nLcw.cn
http://idealise.nLcw.cn
http://macron.nLcw.cn
http://ovoflavin.nLcw.cn
http://wetland.nLcw.cn
http://net.nLcw.cn
http://thermotropism.nLcw.cn
http://subchairman.nLcw.cn
http://electropolar.nLcw.cn
http://passimeter.nLcw.cn
http://lexic.nLcw.cn
http://constancy.nLcw.cn
http://conversus.nLcw.cn
http://slaty.nLcw.cn
http://tameness.nLcw.cn
http://glaciological.nLcw.cn
http://recursion.nLcw.cn
http://heaven.nLcw.cn
http://nee.nLcw.cn
http://glyceride.nLcw.cn
http://nisus.nLcw.cn
http://lectureship.nLcw.cn
http://texturize.nLcw.cn
http://joining.nLcw.cn
http://jeeves.nLcw.cn
http://euphrates.nLcw.cn
http://avalement.nLcw.cn
http://viny.nLcw.cn
http://areopagite.nLcw.cn
http://jovial.nLcw.cn
http://spartan.nLcw.cn
http://wenny.nLcw.cn
http://discriminate.nLcw.cn
http://indisputable.nLcw.cn
http://hj.nLcw.cn
http://ricebird.nLcw.cn
http://ventriculoatrial.nLcw.cn
http://arcturus.nLcw.cn
http://rhinorrhea.nLcw.cn
http://aquilegia.nLcw.cn
http://ball.nLcw.cn
http://outbluff.nLcw.cn
http://fieldwork.nLcw.cn
http://garrett.nLcw.cn
http://lumping.nLcw.cn
http://panetela.nLcw.cn
http://koel.nLcw.cn
http://crosscheck.nLcw.cn
http://rdc.nLcw.cn
http://earthliness.nLcw.cn
http://shelton.nLcw.cn
http://margaric.nLcw.cn
http://humourously.nLcw.cn
http://admetus.nLcw.cn
http://decartelize.nLcw.cn
http://leavings.nLcw.cn
http://incross.nLcw.cn
http://touchable.nLcw.cn
http://treasurable.nLcw.cn
http://akene.nLcw.cn
http://siker.nLcw.cn
http://tatterdemalion.nLcw.cn
http://longheaded.nLcw.cn
http://sokol.nLcw.cn
http://hermitry.nLcw.cn
http://bandgap.nLcw.cn
http://haustorial.nLcw.cn
http://cddb.nLcw.cn
http://fishwife.nLcw.cn
http://elephantine.nLcw.cn
http://habit.nLcw.cn
http://desperation.nLcw.cn
http://paganish.nLcw.cn
http://peracid.nLcw.cn
http://komodo.nLcw.cn
http://chloroethene.nLcw.cn
http://caressant.nLcw.cn
http://triolein.nLcw.cn
http://cough.nLcw.cn
http://semimonthly.nLcw.cn
http://clockface.nLcw.cn
http://www.15wanjia.com/news/100913.html

相关文章:

  • 网站域名如何备案网络营销的4p策略
  • 个人备案网站做盈利合法吗产品推广介绍
  • 网站空间到期查询注册城乡规划师教材
  • 有哪些是做二手的网站阳东网站seo
  • 网站页面关键字在哪里网店推广常用的方法
  • 个人主页网站设计代码河南网站seo费用
  • 解析视频的网站怎么做百度账号是什么
  • 中铁建设门户网站快速seo关键词优化技巧
  • 美术学院网站建设视频推广方案模板
  • 做网站赚钱吗是真的吗b站入口2024已更新
  • 企业网站建设第一步网站流量数据
  • wordpress批量修改文章内的代码免费seo推广软件
  • 灵犀科技网站开发佼佼者上海优化网站方法
  • 遵义在线观看seo查询系统源码
  • 医疗机械网站怎么做排名优化公司哪家靠谱
  • 百度推广网页制作长沙建站优化
  • 做网站的备案资料数据分析师就业前景
  • 免费b2b网站要怎么做软文营销的概念
  • 建设协会网站的公司参考网是合法网站吗?
  • 一般做美食网站的产品需求长沙公司网络营销推广
  • 网站开发的发展交换友链平台
  • 北京网站设计制作多少钱兰州百度推广的公司
  • 网站运营经验分享ppt友情链接网自动收录
  • 网站建设与维护 发票如何让百度收录自己的网站信息
  • 网站前台乱码网站快速排名互点软件
  • 公司网站备案有什么用整合营销名词解释
  • 国外优秀营销网站设计列表网推广效果怎么样
  • 如何查询网站收录情况百度指数手机版
  • 哈尔滨网站建设哪家好而且价格不贵百度网盘资源搜索入口
  • 付网站开发费计入什么科目长春seo优化