Git企业开发控制理论和实操-从入门到深入(六)|多人协作开发

前言

那么这里博主先安利一些干货满满的专栏了!

首先是博主的高质量博客的汇总,这个专栏里面的博客,都是博主最最用心写的一部分,干货满满,希望对大家有帮助。

  • 高质量博客汇总

然后就是博主最近最花时间的一个专栏《Git企业开发控制理论和实操》希望大家多多关注!

  • Git企业开发控制理论和实操

多人协作开发

学习案例一

案例说明

目标:在远端仓库中master分支下的file.txt文件新增两行代码aaabbb
实现:由开发者一新增aaa,由开发者二新增bbb
条件:在一个分支下协作完成。

准备工作

当然我们说过,远端的master分支一定是一个稳定的分支,不能用于开发。所以现在先在远端创建一个dev分支。

在这里插入图片描述
在这里插入图片描述

当然现在本地(云服务器)看不到远端的dev分支,所以先pull一下。

(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git pull 
From gitee.com:Yufch/remote-gitcode* [new branch]      dev        -> origin/dev
Already up-to-date.
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ 

现在本地就有远程的dev分支了。

注意:要区分本地的dev分支和本地所知道的远程的dev分支。

  • 本地的master分支叫做master

  • 远端的master在本地叫做origin/master

  • 远端的dev在本地叫做origin/dev

都是不一样的。

git branch -a # 可以查看本地的所有分支,包括本地的和远端的
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git branch -a
* masterremotes/origin/HEAD -> origin/masterremotes/origin/devremotes/origin/master
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$

然后上面把我的阿里云服务器上的仓库准备好了,我们再准备一个本地(maxOS本地)的一个remote仓库。

(base) [demac@YuMacBook-Air:Git企业开发精品课程]$ git clone https://gitee.com/Yufch/remote-gitcode.git
Cloning into 'remote-gitcode'...
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 17 (delta 3), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (17/17), 4.55 KiB | 4.55 MiB/s, done.
Resolving deltas: 100% (3/3), done.
(base) [demac@YuMacBook-Air:Git企业开发精品课程]$

开始开发

让协作者一完成aaa的更新,协作者二完成bbb的更新。

首先是开发者一:

看一下这行命令。

git checkout -b dev origin/dev

这行命令完成了三件事。

  • 在本地创建了一个dev分支
  • 切到dev分支下
  • 让本地的dev分支和远程的origin/dev分支建立了一个连接

如何查看这个连接呢?

git branch -vv
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git branch -vv
* dev    7393ea0 [origin/dev] add .gitignoremaster 7393ea0 [origin/master] add .gitignore
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$

新增一行aaa

在这里插入图片描述

然后add,commit,push到远程的dev分支中。

(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git add .
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git commit -m "md file.txt: aaa"
[dev 7c49864] md file.txt: aaa1 file changed, 2 insertions(+), 1 deletion(-)
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git status
# On branch dev
# Your branch is ahead of 'origin/dev' by 1 commit.
#   (use "git push" to publish your local commits)
#
nothing to commit, working directory clean
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:git config --global push.default matchingTo squelch this message and adopt the new behavior now, use:git config --global push.default simpleSee 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 273 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Powered by GITEE.COM [GNK-6.4]
To git@gitee.com:Yufch/remote-gitcode.git7393ea0..7c49864  dev -> dev
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$

然后是开发者二:

(base) [demac@YuMacBook-Air:remote-gitcode]$ ls
README.en.md    README.md       file.txt
(base) [demac@YuMacBook-Air:remote-gitcode]$ git branch
* master
(base) [demac@YuMacBook-Air:remote-gitcode]$ git checkout -b dev origin/dev
M       file.txt
branch 'dev' set up to track 'origin/dev'.
Switched to a new branch 'dev'
(base) [demac@YuMacBook-Air:remote-gitcode]$ git add .
(base) [demac@YuMacBook-Air:remote-gitcode]$ git commit -m "md file.txt: bbb"
[dev 220f739] md file.txt: bbbCommitter: 🐟的mac <demac@YuMacBook-Air.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:git config --global user.name "Your Name"git config --global user.email you@example.comAfter doing this, you may fix the identity used for this commit with:git commit --amend --reset-author1 file changed, 2 insertions(+), 1 deletion(-)
(base) [demac@YuMacBook-Air:remote-gitcode]$ git push
To https://gitee.com/Yufch/remote-gitcode.git! [rejected]        dev -> dev (fetch first)
error: failed to push some refs to 'https://gitee.com/Yufch/remote-gitcode.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
(base) [demac@YuMacBook-Air:remote-gitcode]$

我们发现,git拒绝了我们的推送。

这是因为,远程的dev分支下现在是有一行aaa的,而如果我们推送,就会冲突!

所以我们要先使用git pull把远程的东西先拉下来。

在这里插入图片描述

(base) [demac@YuMacBook-Air:remote-gitcode]$ git pull
Auto-merging file.txt
CONFLICT (content): Merge conflict in file.txt
error: could not apply 220f739... md file.txt: bbb
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 220f739... md file.txt: bbb
(base) [demac@YuMacBook-Air:remote-gitcode]$ git add .
(base) [demac@YuMacBook-Air:remote-gitcode]$ git commit -m "merge"
[detached HEAD a37671a] mergeCommitter: 🐟的mac <demac@YuMacBook-Air.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:git config --global user.name "Your Name"git config --global user.email you@example.comAfter doing this, you may fix the identity used for this commit with:git commit --amend --reset-author1 file changed, 2 insertions(+), 1 deletion(-)
(base) [demac@YuMacBook-Air:remote-gitcode]$ git push
fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, usegit push origin HEAD:<name-of-remote-branch>(base) [demac@YuMacBook-Air:remote-gitcode]$ git push origin HEAD:dev
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 292 bytes | 292.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Powered by GITEE.COM [GNK-6.4]
To https://gitee.com/Yufch/remote-gitcode.git7c49864..a37671a  HEAD -> dev
(base) [demac@YuMacBook-Air:remote-gitcode]$ 

这样就可以了。

在这里插入图片描述

将origin/dev合并到origin/master中

PR方式

现在master分支是没有后面两行代码的。
在这里插入图片描述
要用pull request

在这里插入图片描述

提交PR之后,开发人员要做的事情就已经做完了。

审查人员通过看这个PR单子,文件改动这些信息,可以选择通过PR或拒绝PR。

在这里插入图片描述

本地合并dev再将本地master推送到origin/master上

学习案例二

案例说明

目标:远程master分支下新增funciton1和function2文件

实现:由开发者1新增function1,开发者2新增function2

条件:在不同分支下协作完成(各自私有一个分支)

开始开发

开发者一:

(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git branch -a
* devmasterremotes/origin/HEAD -> origin/masterremotes/origin/devremotes/origin/master
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git checkout -b feature-1
Switched to a new branch 'feature-1'
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ vim function-1
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git add .
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git commit -m "add function-1"
[feature-1 a34d9d6] add function-11 file changed, 2 insertions(+)create mode 100644 function-1
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git push origin feature-1 
Counting objects: 16, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (15/15), 1.93 KiB | 0 bytes/s, done.
Total 15 (delta 4), reused 0 (delta 0)
remote: Powered by GITEE.COM [GNK-6.4]
remote: Create a pull request for 'feature-1' on Gitee by visiting:
remote:     https://gitee.com/Yufch/remote-gitcode/pull/new/Yufch:feature-1...Yufch:master
To git@gitee.com:Yufch/remote-gitcode.git* [new branch]      feature-1 -> feature-1
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$

新增了一个function-1文件,然后直接推送到远程,远程就会多一个feature-1分支。

在这里插入图片描述

开发者二:

(base) [demac@YuMacBook-Air:remote-gitcode]$ cat file.txt
hello gitee
hello world
aaa
bbb
(base) [demac@YuMacBook-Air:remote-gitcode]$ ls
README.en.md    README.md       file.txt
(base) [demac@YuMacBook-Air:remote-gitcode]$ git checkout -b feature-2
Switched to a new branch 'feature-2'
(base) [demac@YuMacBook-Air:remote-gitcode]$ touch function-2
(base) [demac@YuMacBook-Air:remote-gitcode]$ vim function-2 
(base) [demac@YuMacBook-Air:remote-gitcode]$ cat function-2 n
I am coding ...
Done!
cat: n: No such file or directory
(base) [demac@YuMacBook-Air:remote-gitcode]$ cat function-2 
I am coding ...
Done!
(base) [demac@YuMacBook-Air:remote-gitcode]$ git add .
(base) [demac@YuMacBook-Air:remote-gitcode]$ git commit -m "add function-2"
[feature-2 2a63bd0] add function-2Committer: 🐟的mac <demac@YuMacBook-Air.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:git config --global user.name "Your Name"git config --global user.email you@example.comAfter doing this, you may fix the identity used for this commit with:git commit --amend --reset-author1 file changed, 2 insertions(+)create mode 100644 function-2
(base) [demac@YuMacBook-Air:remote-gitcode]$ git push origin feature-2
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 311 bytes | 311.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Powered by GITEE.COM [GNK-6.4]
remote: Create a pull request for 'feature-2' on Gitee by visiting:
remote:     https://gitee.com/Yufch/remote-gitcode/pull/new/Yufch:feature-2...Yufch:master
To https://gitee.com/Yufch/remote-gitcode.git* [new branch]      feature-2 -> feature-2
(base) [demac@YuMacBook-Air:remote-gitcode]$

在这里插入图片描述

此时目前到这里,我们没有发生任何冲突!

这是因为,他们是私有一个分支的,所以没有冲突。

但天有不测风云,你的小伙伴突然生病了,但需求还没开发完,需要你帮他继续开发,于是他便把feature-2 分支名告诉你了。这时你就需要在自己的机器上切换到 feature-2 分支帮忙继续开发。

这就回到了:多名开发者在一个机器上开发的情况了。

那么对于开发者一来说,我首先需要获得feature-2这个分支。

先pull下来。

(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git pull 
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 7 (delta 2), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
From gitee.com:Yufch/remote-gitcode* [new branch]      feature-2  -> origin/feature-27393ea0..ef7fda4  master     -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for detailsgit pull <remote> <branch>If you wish to set tracking information for this branch you can do so with:git branch --set-upstream-to=origin/<branch> feature-1(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git branch -adev
* feature-1masterremotes/origin/HEAD -> origin/masterremotes/origin/devremotes/origin/feature-1remotes/origin/feature-2remotes/origin/master
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$

虽然直接git pull会报错,但是我们看到,确实origin/feature-2分支能被本地看到了。

这是为什么?

git pull

  • 拉取分支内的内容(一定要建立连接后才能使用短的git pull命令)
  • 拉取仓库内容(可以直接拉,不需要分支建立连接,因为和分支本来就没关系)

此时,我们就要在本地创建一个feature-2分支,并和远程的origin/feature-2分支建立联系。·

(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git checkout -b feature-2 origin/feature-2
Branch feature-2 set up to track remote branch feature-2 from origin.
Switched to a new branch 'feature-2'
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git branchdevfeature-1
* feature-2master
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ 
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ vim function-2 
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git add .
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git commit -m "md function2 by 1"
[feature-2 280238d] md function2 by 11 file changed, 2 insertions(+)
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:git config --global push.default matchingTo squelch this message and adopt the new behavior now, use:git config --global push.default simpleSee 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 305 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Powered by GITEE.COM [GNK-6.4]
To git@gitee.com:Yufch/remote-gitcode.git2a63bd0..280238d  feature-2 -> feature-2! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@gitee.com:Yufch/remote-gitcode.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you did not intend to push that branch, you may want to
hint: specify branches to push or set the 'push.default' configuration variable
hint: to 'simple', 'current' or 'upstream' to push only the current branch.
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$

此时远程就有了开发者一为开发者二写的内容了。

当然,如果此时开发者二说自己病好了,那么他想继续开发。

此时的开发者二是看不到开发者一新增的内容了,所以,pull一下即可。

开发者二:

(base) [demac@YuMacBook-Air:remote-gitcode]$ ls
README.en.md    README.md       file.txt        function-2
(base) [demac@YuMacBook-Air:remote-gitcode]$ # 先建立连接
(base) [demac@YuMacBook-Air:remote-gitcode]$ git branch --set-upstream-to=origin/feature-2 feature-2
branch 'feature-2' set up to track 'origin/feature-2'.
(base) [demac@YuMacBook-Air:remote-gitcode]$ git branch -vvdev       220f739 [origin/dev: ahead 1, behind 2] md file.txt: bbb
* feature-2 2a63bd0 [origin/feature-2] add function-2master    ef7fda4 [origin/master] !1 dev请求合并到master Merge pull request !1 from Yufc/dev
(base) [demac@YuMacBook-Air:remote-gitcode]$ git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 285 bytes | 95.00 KiB/s, done.
From https://gitee.com/Yufch/remote-gitcode2a63bd0..280238d  feature-2  -> origin/feature-2
Updating 2a63bd0..280238d
Fast-forwardfunction-2 | 2 ++1 file changed, 2 insertions(+)
(base) [demac@YuMacBook-Air:remote-gitcode]$ 

开发好之后push上去就行了。

origin/feature-2和origin/feature-1合并到origin/master上去

这里我们用PR的方式。

在这里插入图片描述

最后把feature-2也提交一份PR。

然后就等审查人员通过PR即可。

在这里插入图片描述

当然,按照之前的建议,我们其实不能像上面那样去合并。

要先让feature-2去合并master,如果有bug,也不会影响master,大家可以参考之前的章节。

解决git branch -a显示已经被删除的远程分支的方法

就是,开发完成之后,远程删除feature-1和feature-2这两个分支了。

但是git branch -a在本地还是能够显示feature-1和feature-2这两个分支,这是不好的。

在这里插入图片描述

git remote show origin

这个命令可以看到远程的一些信息。

(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git remote show origin
* remote originFetch URL: git@gitee.com:Yufch/remote-gitcode.gitPush  URL: git@gitee.com:Yufch/remote-gitcode.gitHEAD branch: masterRemote branches:feature-1               trackedfeature-2               trackedmaster                  trackedrefs/remotes/origin/dev stale (use 'git remote prune' to remove) # 他这里会建议我们去删除这些分支Local branches configured for 'git pull':dev       merges with remote devfeature-2 merges with remote feature-2master    merges with remote masterLocal refs configured for 'git push':feature-1 pushes to feature-1 (up to date)feature-2 pushes to feature-2 (local out of date)master    pushes to master    (local out of date)
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ 
git remote prune origin # 这个命令可以去修剪一些已经被删除的分支
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$ git remote prune origin
Pruning origin
URL: git@gitee.com:Yufch/remote-gitcode.git* [pruned] origin/dev
(base) [yufc@ALiCentos7:~/Src/Bit-Courses/GitDevelopment/remote-gitcode]$

这里显示已经帮我们删除了dev分支了。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/118559.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

PixelSNAIL论文代码学习(2)——门控残差网络的实现

文章目录 引言正文门控残差网络介绍门控残差网络具体实现代码使用pytorch实现 总结 引言 阅读了pixelSNAIL,很简短&#xff0c;就用了几页&#xff0c;介绍了网络结构&#xff0c;介绍了试验效果就没有了&#xff0c;具体论文学习链接 这段时间看他的代码&#xff0c;还是挺痛…

时序预测 | MATLAB实现CNN-GRU卷积门控循环单元时间序列预测(风电功率预测)

时序预测 | MATLAB实现CNN-GRU卷积门控循环单元时间序列预测&#xff08;风电功率预测&#xff09; 目录 时序预测 | MATLAB实现CNN-GRU卷积门控循环单元时间序列预测&#xff08;风电功率预测&#xff09;预测效果基本介绍程序设计参考资料 预测效果 基本介绍 1.时序预测 | MA…

《爵士乐史》乔德.泰亚 笔记

第一章 【美国音乐的非洲化】 【乡村布鲁斯和经典布鲁斯】 布鲁斯&#xff1a;不止包括忧愁、哀痛 十二小节布鲁斯特征&#xff1a; 1.乐型&#xff08;A:主、B:属、C/D:下属&#xff09;&#xff1a;A→A→B→A→C→D→A→A 2.旋律&#xff1a;大三、小三、降七、降五 盲人…

漏洞修复:在应用程序中发现不必要的 Http 响应头

描述 blablabla描述&#xff0c;一般是在返回的响应表头中出现了Server键值对&#xff0c;那我们要做的就是移除它&#xff0c;解决方案中提供了nginx的解决方案 解决方案 第一种解决方案 当前解决方案会隐藏nginx的版本号&#xff0c;但还是会返回nginx字样&#xff0c;如…

Gateway的服务网关

Gateway服务网关 Gateway网关是我们服务的守门神&#xff0c;所有微服务的统一入口。 网关的核心功能特性&#xff1a; 请求路由 权限控制 限流 架构如下&#xff1a; gateway使用 引入依赖 创建gateway服务&#xff0c;引入依赖 <!--网关--> <dependency>…

Spring Boot中通过maven进行多环境配置

上文 java Spring Boot将不同配置拆分入不同文件管理 中 我们说到了&#xff0c;多环境的多文件区分管理 说到多环境 其实不止我们 Spring Boot有 很多的东西都有 那么 这就有一个问题 如果 spring 和 maven 都配置了环境 而且他们配的不一样 那么 会用谁的呢&#xff1f; 此…

镜之Json Compare Diff

前言 “镜” 寓意是凡事都有两面性,Json 对比也不例外! 因公司业务功能当中有一个履历的功能,它有多个版本的 JSON 数据需要对比出每个版本的不同差异节点并且将差异放置在一个新的 JSON 当中原有结构不能变动,差异节点使用数组对象的形式存储,前端点击标红即可显示多个版本的节…

lenovo联想笔记本小新 潮7000-14IKBR 2018款(81GA)原装出厂Windows10系统镜像

自带所有驱动、出厂主题壁纸LOGO、Office办公软件、联想电脑管家等预装程序 链接&#xff1a;https://pan.baidu.com/s/1ynP4d5z7MPF9l5U5lCjDzQ?pwdhjvj 提取码&#xff1a;hjvj 所需要工具&#xff1a;16G或以上的U盘 文件格式&#xff1a;ISO 文件大小&#x…

JUC并发编程--------CAS、Atomic原子操作

什么是原子操作&#xff1f;如何实现原子操作&#xff1f; 什么是原子性&#xff1f; 事务的一大特性就是原子性&#xff08;事务具有ACID四大特性&#xff09;&#xff0c;一个事务包含多个操作&#xff0c;这些操作要么全部执行&#xff0c;要么全都不执行 并发里的原子性…

eureka服务注册和服务发现

文章目录 问题实现以orderservice为例orderservice服务注册orderservice服务拉取 总结 问题 我们要在orderservice中根据查询到的userId来查询user&#xff0c;将user信息封装到查询到的order中。 一个微服务&#xff0c;既可以是服务提供者&#xff0c;又可以是服务消费者&a…

0基础学习VR全景平台篇 第94篇:智慧景区浏览界面介绍

一、景区详细信息介绍 点击左上角的图标就可以看到景区详细信息例如景区简介&#xff0c;地址&#xff0c;开放信息&#xff0c;联系电话等 二、问题反馈中心 点击左下角的【问题反馈】按钮向作者进行问题反馈 三、开场地图 1、直接点击开场地图页面上的图标浏览该场景 2、通…

【JS】—闭包—双例对比法学习总结

一、选定知识点&#xff1a;闭包 二、指令学习 1. 闭包MDN的定义 闭包&#xff08;closure&#xff09;是一个函数以及其捆绑的周边环境状态&#xff08;lexical environment&#xff0c;词法环境&#xff09;的引用的组合。换而言之&#xff0c;闭包让开发者可以从内部函数…

常用的msvcp140.dll丢失的解决方法,msvcp140.dll丢失的原因

自从电脑出现故障&#xff0c;我的生活变得一团糟。他每天都需要使用电脑处理工作&#xff0c;可是突然有一天&#xff0c;他发现许多软件和游戏都无法正常运行。错误提示显示“找不到msvcp140.dll”&#xff0c;这让他感到非常困扰。今天想和大家分享一个在计算机使用过程中经…

使用爬虫代码获得深度学习目标检测或者语义分割中的图片。

问题描述&#xff1a;目标检测或者图像分割需要大量的数据&#xff0c;如果手动从网上找的话会比较慢&#xff0c;这时候&#xff0c;我们可以从网上爬虫下来&#xff0c;然后自己筛选即可。 代码如下&#xff08;不要忘记安装代码依赖的库&#xff09;&#xff1a; # -*- co…

linux 内存一致性

linux 出现内存一致性的场景 1、编译器优化 &#xff0c;代码上下没有关联的时候&#xff0c;因为编译优化&#xff0c;会有执行执行顺序不一致的问题&#xff08;多核单核都会出现&#xff09; 2、多核cpu乱序执行&#xff0c;cpu的乱序执行导致内存不一致&#xff08;多核出…

elasticSearch+kibana+logstash+filebeat集群改成https认证

文章目录 一、生成相关证书二、配置elasticSearh三、配置kibana四、配置logstash五、配置filebeat六、连接https es的java api 一、生成相关证书 ps&#xff1a;主节点操作 切换用户&#xff1a;su es 进入目录&#xff1a;cd /home/es/elasticsearch-7.6.2 创建文件&#x…

OpenCV(十三):图像中绘制直线、圆形、椭圆形、矩形、多边形和文字

目录 1.绘制直线line() 2.绘制圆形circle() 3.绘制椭圆形ellipse() 4.绘制矩形rectangle() 5.绘制多边形 fillPoly() 6.绘制文字putText() 7.例子 1.绘制直线line() CV_EXPORTS_W void line(InputOutputArray img,Point pt1, Point pt2,const Scalar& color,int t…

【数据结构与算法 三】常见数据结构与算法组合应用方式

一般的数据结构和对应的 很抱歉,作为一个文本AI模型,我无法直接绘制图表,但我可以为您列出常见的算法和数据结构分类,并为每个分类提供简要说明。您可以根据这些信息自行绘制图表。 算法分类: 搜索算法:用于在数据集中查找特定元素的算法,如线性搜索、二分搜索等。 排…

MTK6761/MT6761安卓核心板4G安卓智能模块详细参数性能介绍

MTK6761 安卓核心板采用12nm制程四核Cortex-A53、最高主频2.0GHZ 处理器&#xff0c;板载内存为 1GB8GB(2GB16GB、3GB32GB、4GB64GB)&#xff0c;搭载Android 9.0操作系统。 MTK6761&#xff08;曦力 A22&#xff09;安卓核心板基本概述 MTK6761安卓核心板 是一款高性能低功耗…

HikariCP源码修改,使其连接池支持Kerberos认证

HikariCP-4.0.3 修改HikariCP源码,使其连接池支持Kerberos认证 修改后的Hikari源码地址:https://github.com/Raray-chuan/HikariCP-4.0.3 Springboot使用hikari连接池并进行Kerberos认证访问Impala的demo地址:https://github.com/Raray-chuan/springboot-kerberos-hikari-im…