summary
git学习
status
Published
tags
开发
配置
category
环境配置
date
Oct 5, 2021
slug
git
icon

学习git branch

https://learngitbranching.js.org/?locale=zh_CN

git配置

git config --global user.name "example"
git config --global user.email "example@example.com"

脚本更新Github host

解决的相关问题:
  • 访问速度慢
#update github hosts from https://gitee.com/ineo6/hosts/raw/master/hosts

# backup of the origin hosts file without github ip
origin_hosts='/home/admin/updateGithubHost/origin_hosts'

# where is your local hosts?
local_hosts_path='/etc/hosts'

# the source of the github hosts
src_url='https://gitee.com/ineo6/hosts/raw/master/hosts'

{
    touch temp_hosts
    cat ${origin_hosts}
    cat ${origin_hosts} > ./temp_hosts
    echo " " >> ./temp_hosts
    curl ${src_url} >> ./temp_hosts
    echo " " >> ./temp_hosts # 强迫症

} && {
   	sudo mv ${local_hosts_path} ${local_hosts_path}.bak
  	sudo mv ./temp_hosts ${local_hosts_path}
}
raspberryHomebrew