生而为人

程序员的自我修养

0%

运行

win+R mstsc 远程连接

certificate

win search 中 搜cert即可

[3/24 10:17] Bolun YaoNew Bing又增加了什么神奇的监测机制,现在挂私人梯子完全上不去了
今天之前还没什么问题,现在会被疯狂redirect到“国内版”,即便偶尔打开 chat 一次也会报错 looks like your network settings are preventing access to this feature.
全局也没用了,这怎么检测到的

[3/24 10:50] Ray Sun
清 cookie,或者 ?mkt=en-US ?
​[3/24 10:51] Ailing Ji
我倒是不会,你是关闭过浏览器吗,设置一下url参数:setlang=en&cc=us
<https://teams.microsoft.com/l/message/19:9268e0678e654fc1a8965e739a1859ec@thread.skype/1679626207358?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&amp;groupId=2e06e852-2e42-4acb-a366-5df01ee87a68&amp;parentMessageId=1679624261164&amp;teamName=Suzhou Life&channelName=General&createdTime=1679626207358&allowXTenantAccess=false>
关闭浏览器试过了,清cookie 和 mkt 还没试。不过有个更根本的问题是即便想办法打开 chat 也会报错 looks like your network settings are preventing access to this feature.
貌似最近有些 IDC 的 IP 段也被 new bing ban 了,可以在梯子上套一层 cloudflare warp

推荐chatgpt。用公司的 150刀 azure credit,把chatgpt 和 speech recognition, text to speech 连起来,就是一个超棒的英语口语陪练了

规则引擎:

easyRule

[toc]

标准流程

  1. 添加暂存区git add .()

分支

克隆

1
2
3
4
5
git checkout -b dev(本地分支名称) origin/develop(远程分支名称)

error log:
fatal: 'origin/MTSparkMSNv2' is not a commit and a branch 'users/jingqicao/M2B_V2' cannot be created from it
need run git pull to update.

删除

Git 操作——如何删除本地分支和远程分支

新分支push到远端

1
2
3
git push --set-upstream origin users/jingqicao/performance-optimize
// 需要保证本地分支名称与指定的remote分支名称完全相同,否则
error: src refspec users/jingqicao/performance-optimize does not match any

本地关联远程分支

1
2
3
4
5
6
7
8
9
10
11
1. push同时关联
git push --set-upstream origin xxx

2. 关联已经存在的
git branch --set-upstream-to=origin/dev

3. 重新关联
# 切换到该分支(如果不在的话)
git switch feature/login
# 将当前分支强制重置为远程分支的状态(注意:这会丢弃本地的所有未推送提交!)
git reset --hard origin/feature/login

本地切换远程已有分支

1
2
3
4
5
6
7
8
9
1. git 2.23+
# 1. 先从远程仓库拉取最新的分支引用信息
git fetch
# 2. 直接切换到远程分支(git 会自动识别 origin/分支名)
git switch 远程分支名

2. git 2.23-
git fetch
git checkout -b 本地分支名 origin/远程分支名

内容

撤销修改

1
2
3
// 这是一个危险的操作,会撤销指定文件或全部文件的所有本地修改
git checkout -- <file>
git checkout -- .

提交(commit)

1
2
3
4
5
6
7
git commit -m ""

git commit -am ""
追加commit注释,一次push不会生成多个commit节点

git commit --amend
可以修改最近一次commit的注释

查看当前commit

1
git log

对比两个commit(两个commit可以来自不同分支)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
hash2 在 hash1上的修改
git diff commit-hash1 commit-hash2 --stat

如果想进一步查看test修改了那些地方:
只需将 git diff hash1 hash2 --stat 中的 --stat改为具体的文件即可

如果想将两次提交的差异部分提取成补丁文件
git diff hash1 hash2 filename > patch_name

如果想将多个文件的差异生成到同一patch文件 则:
git diff hash1 hash2 filename1 filename2 > patch_name

使用工具(左右两个commit,对应了difftool的左右窗口):
git difftool 199b8598f422485e453f1e4e87aaa6176ff48ad0 4b97457217e29355ddeff0aec8562271c06ac6fe --stat

对比两个分支

1
2
3
4
git diff users/jingqicao/temp-master master --name-status
可以展示变更文件的全路径

git diff-tree
  1. Git 修改已提交的commit注释