Mac指令备忘

# Git分支说明
master => release  => develop => develop_版本号(版本分支,模块分支code review的目标分支)=> develop_版本号_module(模块分支)

# 规范Git提交说明
[feat] 新增功能
[fix] bug修复
[update] 功能升级
[merge] 合并分支
[optimi] 逻辑优化
[perf] 性能优化
[refact] 模块重构
[style] 修改格式
[docs] 文档变更
[test] 增加测试
[build] 构造变动
[revert] 回退

# 路径中 /、./、../ 的含义
/:代表根目录
./:代表当前所在的目录
../:代表上一层目录

# 设置 | 取消 | 查询 Git 全局代理(socks5-支持TCP & UDP)
git config --global http.proxy socks5://127.0.0.1:7890
git config --global https.proxy socks5://127.0.0.1:7890
git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global -l

4064f94655b04e05a35c5d66f5d4e278.png

# GitLab 设置代理
curl ip.gs    查看自己命令行的IP
vim ~/.bash_profile    在bash_profile 里加入代理开关函数
:w    保存     
:wq    保存并退出
source ~/.bash_profile    使配置文件生效
setProxy    开启代理    
unsetProxy    关闭代理

function setProxy() {
    export http_proxy=http://10.1.10.1:1008
    export https_proxy=http://10.1.10.1:1008
    export no_proxy='gitlab.domain.com'
}

function unsetProxy() {
    unset http_proxy
    unset https_proxy
    unset no_proxyy
}

# Git 终端命令(Git配置修改可以直接进入.git/config操作
cd desktop     进入桌面 
git clone Git地址    拉取Git仓库到本地
cd desktop/zhengmiaokai/MKUtils    进入目录
git checkout main    切换到main分支
git status    检测当前状态
git add .    暂存所有文件
git commit -m "<feat>: 提交代码"    提交本地仓库
git pull --rebase origin main   拉取远程最新代码
git push -u origin main    推送至远程仓库的main分支
git push origin MKUtils_1.0.1    推送标签到origin 

GitHub配置SSH Key:Github配置SSH Key的步骤,修改本地仓库关联的Git地址

git remote rm origin    移除远程Git地址关联
git remote add origin git@github.com:zhengmiaokai/MKUtils.git    关联远程Git地址

本地仓库.git/config的内容格式

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	ignorecase = true
	precomposeunicode = true
[remote "origin"]
	url = git@github.com:zhengmiaokai/MKUtils.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
	remote = origin
	merge = refs/heads/main

# 安装包已损坏
sudo spctl --master-disable
sudo xattr -d com.apple.quarantine /Applications/xxx.app(M1)

# Bugly符号表工具
运行环境:JDK 8(暂时不支持JDK 16)
上传dysm:java -jar buglyqq-upload-symbol.jar -appid 968259478589 -appkey 68925796-3259-9986-5698-bd66dd99dd45d -bundleid com.base.phone -version 1.0.0 -platform IOS -inputSymbol /Users/mikazheng/Downloads/MKBase.app.dSYM

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值