Git源碼管理

參考視頻:16-git的日志以及版本管理_嗶哩嗶哩_bilibili

參考博客:Git && Docker 學習筆記-CSDN博客

目錄

簡介

個人操作初始化

初始化git目錄

查看生成的git目錄文件

配置git工作目錄的用戶信息

查看工作區的狀態,生成文件的狀態

添加文件到暫存區、倉庫區

倉庫區的版本回退和恢復

暫存區回退到工作區

工作區及暫存區修改的撤銷

遠程倉庫克隆到本地初始化

遠程倉庫的文件創建與上傳及信息查詢

Git 多人操作

多人協助沖突的發生及解決

標簽

分支操作


簡介

當前最先進的分布式版本控制系統,作用于源代碼管理,方便多人協同開發,便于版本控制

個人操作初始化
初始化git目錄

git init

root@pass:/home/pass/Desktop/mytest# git init????????? 初始化目錄生成 .git目錄
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:?? git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:?? git branch -m <name>
Initialized empty Git repository in /home/pass/Desktop/mytest/.git/

查看生成的git目錄文件

ll???????? 查看隱藏目錄命令

root@pass:/home/pass/Desktop/mytest# ll???????? 查看隱藏目錄命令ll
total 12
drwxr-xr-x 3 root root 4096? 3月? 1 20:00 ./
drwxr-xr-x 4 pass pass 4096? 3月? 1 20:00 ../
drwxr-xr-x 7 root root 4096? 3月? 1 20:00 .git/????? 以點開頭的目錄系統不可見
root@pass:/home/pass/Desktop/mytest# cd .git/
root@pass:/home/pass/Desktop/mytest/.git# ls
branches? config? description? HEAD? hooks? info? objects? refs

配置git工作目錄的用戶信息

git config user.name pass??? 用戶姓名

git config user.email pass@qq.com? 用戶郵件

root@pass:/home/pass/Desktop/mytest/.git# git config user.name pass??? 用戶姓名
root@pass:/home/pass/Desktop/mytest/.git# git config user.email pass@qq.com? 用戶郵件
root@pass:/home/pass/Desktop/mytest/.git# cat config???? 查看用戶信息
[core]
??????? repositoryformatversion = 0
??????? filemode = true
??????? bare = false
??????? logallrefupdates = true
[user]
??????? name = pass
??????? email = pass@qq.com

查看工作區的狀態,生成文件的狀態

git status????? 查看當前狀態

root@pass:/home/pass/Desktop/mytest# git status????? 查看當前狀態
On branch master

No commits yet

nothing to commit (create/copy files and use "git add" to track)
root@pass:/home/pass/Desktop/mytest# touch file????? 工作區創建文件
root@pass:/home/pass/Desktop/mytest# git status
On branch master

No commits yet

Untracked files:
? (use "git add <file>..." to include in what will be committed)
??????? file

nothing added to commit but untracked files present (use "git add" to track)

添加文件到暫存區、倉庫區

git add file???????????????????????????? 添加文件file到暫存區 "."當前全部文件

git commit -m 'first commit'?? 提交到倉庫[參數-m 備注信息]

git log?????????????????????????? ? ? ? ?? 查看提交日志

root@pass:/home/pass/Desktop/mytest# git add file?? 添加文件file 到暫存區"."當前全部文件
root@pass:/home/pass/Desktop/mytest# git status???? 查看當前狀態
On branch master

No commits yet

Changes to be committed:
? (use "git rm --cached <file>..." to unstage)
??????? new file:?? file

Untracked files:
? (use "git add <file>..." to include in what will be committed)
??????? me

root@pass:/home/pass/Desktop/mytest# git commit -m 'first commit'?? 提交到倉庫[-m 備注]
[master (root-commit) 474ca08] first commit
?1 file changed, 0 insertions(+), 0 deletions(-)
?create mode 100644 file
root@pass:/home/pass/Desktop/mytest# git status
On branch master
Untracked files:
? (use "git add <file>..." to include in what will be committed)
??????? me

nothing added to commit but untracked files present (use "git add" to track)
root@pass:/home/pass/Desktop/mytest# git log??????????????????????????? 查看日志
commit 474ca0871818584972749d6b84d2d814825d8b2f (HEAD -> master)
Author: pass <pass@qq.com>
Date:?? Fri Mar 1 20:08:06 2024 +0800

??? first commit

倉庫區的版本回退和恢復

回退版本

  • HEAD?? 當前最新版本
  • HEAD^? 當前最新版本的前一個版本
  • HEAD^^ 當前最新版本的前兩個版本,依次類推
  • HEAD~1 當前最新版本的前一個版本
  • HEAD~10 當前版本的前10個版本,依次類推

eg:?

git reset? --hard? HEAD~??? 回退到上一個版本

git reset? --hard? 版本號? ?? 回退到指定的版本

git reflog? ? ? ? ? ? ? ? ? ? ? ? ? ?? 查看所有的版本記錄

root@pass:/home/pass/Desktop/mytest# git reflog?? 查看所有的版本記錄
c9097f1 (HEAD -> master) HEAD@{0}: commit: second commit
474ca08 HEAD@{1}: commit (initial): first commit
root@pass:/home/pass/Desktop/mytest# git reset --hard HEAD^?? 回退到上一版本
HEAD is now at 474ca08 first commit
root@pass:/home/pass/Desktop/mytest# git log???????????????????????????? 查看提交的日志
commit 474ca0871818584972749d6b84d2d814825d8b2f (HEAD -> master)
Author: pass <pass@qq.com>
Date:?? Fri Mar 1 20:08:06 2024 +0800

??? first commit
root@pass:/home/pass/Desktop/mytest# git reflog
474ca08 (HEAD -> master) HEAD@{0}: reset: moving to HEAD^
c9097f1 HEAD@{1}: commit: second commit
474ca08 (HEAD -> master) HEAD@{2}: commit (initial): first commit
root@pass:/home/pass/Desktop/mytest# git reset --hard c9097f1?? 回退到第二個版本
HEAD is now at c9097f1 second commit

暫存區回退到工作區

git reset HEAD [file]

root@pass:/home/pass/Desktop/mytest# git status
On branch master
Changes to be committed:
? (use "git restore --staged <file>..." to unstage)
??????? new file:?? learn.txt
??????? new file:?? me

root@pass:/home/pass/Desktop/mytest# git reset HEAD learn.txt
root@pass:/home/pass/Desktop/mytest# git status
On branch master
Changes to be committed:
? (use "git restore --staged <file>..." to unstage)
??????? new file:?? me

Untracked files:
? (use "git add <file>..." to include in what will be committed)
??????? learn.txt

工作區及暫存區修改的撤銷

git checkout learn.txt?? 撤銷工作區及暫存區的修改

root@pass:/home/pass/Desktop/mytest# git status?? 暫存區的文件learn.txt
On branch master
Changes to be committed:
? (use "git restore --staged <file>..." to unstage)
??????? new file:?? learn.txt
??????? new file:?? me

root@pass:/home/pass/Desktop/mytest# echo 888 >> learn.txt? 修改工作區的文件
root@pass:/home/pass/Desktop/mytest# cat learn.txt
666
999
888
root@pass:/home/pass/Desktop/mytest# git checkout learn.txt?? 撤銷工作區及暫存區的修改
Updated 1 path from the index
root@pass:/home/pass/Desktop/mytest# cat learn.txt
666
999

遠程倉庫克隆到本地初始化

git clone git@github.com:past-plus/learn_test.git

root@pass:/home/pass/remote_learn# git clone git@github.com:past-plus/learn_test.git
Cloning into 'learn_test'...?? 克隆遠程倉庫到本地
warning: You appear to have cloned an empty repository.
root@pass:/home/pass/remote_learn# cd learn_test/
root@pass:/home/pass/remote_learn/learn_test# ll
total 12
drwxr-xr-x 3 root root 4096? 3月? 1 21:24 ./
drwxr-xr-x 3 root root 4096? 3月? 1 21:24 ../
drwxr-xr-x 7 root root 4096? 3月? 1 21:24 .git/
root@pass:/home/pass/remote_learn/learn_test# cd .git/
root@pass:/home/pass/remote_learn/learn_test/.git# ls??? 遠程倉庫的git配置
branches? config? description? HEAD? hooks? info? objects? refs
root@pass:/home/pass/remote_learn/learn_test/.git# cat config?? 遠程倉庫的配置信息
[core]
??????? repositoryformatversion = 0
??????? filemode = true
??????? bare = false
??????? logallrefupdates = true
[remote "origin"]
??????? url = git@github.com:past-plus/learn_test.git
??????? fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
??????? remote = origin
??????? merge = refs/heads/main
root@pass:/home/pass/remote_learn/learn_test# git config user.name pass?? 配置用戶信息
root@pass:/home/pass/remote_learn/learn_test# git config user.eamil pass@qq.com

遠程倉庫的文件創建與上傳及信息查詢

git add .?? 提交到暫存區

git status? 查看當前狀態

git commit -m 'test and learn'? 提交到倉庫

git push??? 上傳到遠程倉庫

root@pass:/home/pass/remote_learn/learn_test# touch test.py learn.py? 創建文件
root@pass:/home/pass/remote_learn/learn_test# git add .?? 提交到暫存區
root@pass:/home/pass/remote_learn/learn_test# git status? 查看當前狀態
On branch main

No commits yet

Changes to be committed:
? (use "git rm --cached <file>..." to unstage)
??????? new file:?? learn.py
??????? new file:?? test.py

root@pass:/home/pass/remote_learn/learn_test# git commit -m 'test and learn'? 提交到倉庫
[main (root-commit) b7588d1] test and learn
?2 files changed, 0 insertions(+), 0 deletions(-)
?create mode 100644 learn.py
?create mode 100644 test.py
root@pass:/home/pass/remote_learn/learn_test# git push??? 上傳到遠程倉庫
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 232 bytes | 232.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:past-plus/learn_test.git
?* [new branch]????? main -> main
root@pass:/home/pass/remote_learn/learn_test# vim test.py? 更新文件信息,需要再次上傳
root@pass:/home/pass/remote_learn/learn_test# git commit -m 'test modified'
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
? (use "git add <file>..." to update what will be committed)
? (use "git restore <file>..." to discard changes in working directory)
??????? modified:?? test.py

no changes added to commit (use "git add" and/or "git commit -a")
root@pass:/home/pass/remote_learn/learn_test# git add .
root@pass:/home/pass/remote_learn/learn_test# git commit -m 'test modified'
[main 9d0f8f9] test modified
?1 file changed, 2 insertions(+)
root@pass:/home/pass/remote_learn/learn_test# git status
On branch main
Your branch is ahead of 'origin/main' by 1 commit.
? (use "git push" to publish your local commits)

nothing to commit, working tree clean
root@pass:/home/pass/remote_learn/learn_test# git log? 查看提交日志
commit 9d0f8f9b493856ec917edd67807ad0676e12da9a (HEAD -> main)
Author: pass <10752095+past_pass@user.noreply.gitee.com>
Date:?? Fri Mar 1 21:35:20 2024 +0800

??? test modified

commit b7588d1d98bf2a1287904610bff4d92397393440 (origin/main)
Author: pass <10752095+past_pass@user.noreply.gitee.com>
Date:?? Fri Mar 1 21:30:52 2024 +0800

??? test and learn
root@pass:/home/pass/remote_learn/learn_test# git reflog? 查看歷史版本
9d0f8f9 (HEAD -> main) HEAD@{0}: commit: test modified
b7588d1 (origin/main) HEAD@{1}: commit (initial): test and learn
root@pass:/home/pass/remote_learn/learn_test# git push?? 提交到遠程倉庫
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 303 bytes | 303.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:past-plus/learn_test.git
?? b7588d1..9d0f8f9? main -> main

?運行結果:

Git 多人操作

git commit -am 'xxxx'??? 參數a 表示add添加到暫存區

git pull?????????????????????????? 拉取遠程倉庫到工作區

員工a的操作

root@pass:/home/pass/gitee_test/test_a# git config user.name 'a'? 配置用戶信息
root@pass:/home/pass/gitee_test/test_a# git config user.name 'a@qq.com'
root@pass:/home/pass/gitee_test/test_a# touch test.py
root@pass:/home/pass/gitee_test/test_a# git add .
root@pass:/home/pass/gitee_test/test_a# git status

root@pass:/home/pass/gitee_test/test_a# git commit -m 'test commit first'? 提交到倉庫
[master (root-commit) 7bc421c] test commit first
?1 file changed, 0 insertions(+), 0 deletions(-)
?create mode 100644 test.py
root@pass:/home/pass/gitee_test/test_a# git push??? 上傳到遠程倉庫
Username for 'https://gitee.com': past_pass
Password for 'https://past_pass@gitee.com':
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 226 bytes | 226.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Powered by GITEE.COM [GNK-6.4]
To https://gitee.com/past_pass/test.git
?* [new branch]????? master -> master

員工b

root@pass:/home/pass/gitee_test/test_b# git config user.name 'b'
root@pass:/home/pass/gitee_test/test_b# git config user.email 'b@qq.com'
root@pass:/home/pass/gitee_test/test_b# git pull
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 206 bytes | 206.00 KiB/s, done.
From https://gitee.com/past_pass/test
?* [new branch]????? master???? -> origin/master
root@pass:/home/pass/gitee_test/test_b# ls
test.py

多人協助沖突的發生及解決

造成的原因: 多人修改同一份代碼,需要先拉取最新的代碼修改,否則會造成沖突

員工a

root@pass:/home/pass/gitee_test/test_a# echo 'echo "git learn"'>>learn.py
root@pass:/home/pass/gitee_test/test_a# cat learn.py
echo "learn"
echo "git learn"
root@pass:/home/pass/gitee_test/test_a# git commit -am 'update learn'
[master cda86ba] update learn
?1 file changed, 1 insertion(+)
root@pass:/home/pass/gitee_test/test_a# git push

員工b[沒有pull拉取遠程倉庫的代碼而是直接在本地進行修改上傳造成沖突]

root@pass:/home/pass/gitee_test/test_b# cat learn.py
echo "learn"
echo "xxx"
root@pass:/home/pass/gitee_test/test_b# git commit -am 'update file'

root@pass:/home/pass/gitee_test/test_b# git push

?? git:(test) git pull origin test
?* branch????????????? test?????? -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint:?? git config pull.rebase false? # merge (the default strategy)
hint:?? git config pull.rebase true?? # rebase
hint:?? git config pull.ff only?????? # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

標簽
  • 當一個大版本完成之后,需要打一個標簽,記錄大版本備份代碼

git tag -a v1.0(標簽名) -m 'version1.0'(描述) 本地打標簽

git push origin v1.0(標簽名)??????????????????????????????? 推送標簽到遠程倉庫

root@pass:/home/pass/gitee_test/test# git commit -am 'commit learn file'
[master 62eda34] commit learn file
?1 file changed, 1 insertion(+), 1 deletion(-)
root@pass:/home/pass/gitee_test/test# git tag -a v1.0 -m 'version1.0'
root@pass:/home/pass/gitee_test/test# git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Writing objects: 100% (3/3), 278 bytes | 139.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Powered by GITEE.COM [GNK-6.4]
To https://gitee.com/past_pass/test.git
?? e1c4aef..62eda34? master -> master
root@pass:/home/pass/gitee_test/test# git push origin v1.0

?運行結果:

分支操作

git branch???????????????????????? 查看當前分支

git checkout -b test????????? 創建并切換分支test

git checkout master???????? 切換主分支master

git merge test?????????????????? 融合分支test到主支master

root@pass:/home/pass/gitee_test/test# git branch
* master
root@pass:/home/pass/gitee_test/test# git checkout -b test
Switched to a new branch 'test'
root@pass:/home/pass/gitee_test/test# git branch
? master
* test

root@pass:/home/pass/gitee_test/test# git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
root@pass:/home/pass/gitee_test/test# git branch
* master
? test

root@pass:/home/pass/gitee_test/test# git merge test
Already up to date.

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/713798.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/713798.shtml
英文地址,請注明出處:http://en.pswp.cn/news/713798.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

【JS】生成N位隨機數

作用 用于郵箱驗證碼 碼 ramNum.js /*** 生成N位隨機數字* param {Number} l 默認&#xff1a;6&#xff0c;默認生成6位隨機數字* returns 返回N位隨機數字*/ const ramNum (l 6) > {let num for (let i 0; i < l; i) {const n Math.random()const str String(n…

C++面試干貨---帶你梳理常考的面試題(一)

顧得泉&#xff1a;個人主頁 個人專欄&#xff1a;《Linux操作系統》 《C從入門到精通》 《LeedCode刷題》 鍵盤敲爛&#xff0c;年薪百萬&#xff01; 1.C和C的區別 1.語法和特性&#xff1a;C是一種過程式編程語言&#xff0c;而C是一種面向對象編程語言。C在C的基礎上增加…

Java智慧云HIS醫院信息化系統源碼 更具靈活性、擴展性

目錄 什么是云HIS 趨勢與轉變 HIS上云后有哪些好處 解決方案 云HIS組成 1、門診掛號 2、住院管理 3、電子病歷 4、藥物管理 5、統計報表 6、綜合維護 7、運營運維 什么是云HIS 云HIS是一種基于云計算技術的醫院信息管理系統。云HIS可以幫助醫院管理各類醫院信息&a…

CIE-Alevel-Physics分類真題下載(更新中)

鏈接真題歸類年份https://www.savemyexams.com/https://gceguide.com/papershttps://pastpapers.papacambridge.com/https://rocketrevise.comhttps://www.exam-mate.com/markhint.inhttps://xtremepape.rs/threads/as-and-a-level-physics-topical-pastpapers-upto-2015-with-…

Java Linux基本命令面試題

Java Linux基本命令面試題 前言1、查看文件內容有哪些命令可以使用&#xff1f;2、終端是哪個文件夾下的哪個文件&#xff1f;黑洞文件是哪個文件夾下的哪個命令&#xff1f;3、用什么命令對一個文件的內容進行統計&#xff1f;(行號、單詞數、字節數)4、怎么使一個命令在后臺運…

每日OJ題_分治歸并②_力扣LCR 170. 交易逆序對的總數

目錄 力扣LCR 170. 交易逆序對的總數 解析代碼1 解析代碼2 力扣LCR 170. 交易逆序對的總數 LCR 170. 交易逆序對的總數 難度 困難 在股票交易中&#xff0c;如果前一天的股價高于后一天的股價&#xff0c;則可以認為存在一個「交易逆序對」。請設計一個程序&#xff0c;輸…

Linux系統中安裝redis+redis后臺啟動+常見相關配置

1、下載Redis Redis官網&#xff1a;https://redis.io/ 歷史版本&#xff1a; http://download.redis.io/releases 2、連接Linux&#xff08;或者VMwear&#xff09; 我們安裝的是linux版本的redis 打開xftp我們需要先將我們的Redis上傳到服務器上 解壓到這里 解壓的指令 …

創建型模式之建造者模式

一、概述 1、建造者模式&#xff1a;將一個復雜對象的構建和它的表示分離&#xff0c;使得同樣的構建過程可以創建不同的表示 2、將客戶端與包含多個部件的復雜對象的創建過程分離&#xff0c;客戶端無須知道復雜對象的內部組成部分與裝配方式&#xff0c;只需要知道所需建造…

Spring MVC源碼中設計模式——適配器模式

適配器模式介紹 適配器模式&#xff08;Adapter Pattern&#xff09;是作為兩個不兼容的接口之間的橋梁。這種類型的設計模式屬于結構型模式&#xff0c;它結合了兩個獨立接口的功能。 應用場景&#xff1a; 1、系統需要使用現有的類&#xff0c;而此類的接口不符合系統的需要…

[c++] 繼承和多態整理一

1 private 和 protected 繼承&#xff0c;子類指針不能賦值給父類指針 如下代碼&#xff0c;有一個基類 Base&#xff0c;Derived1&#xff0c;Derived2&#xff0c;Derived3 3 個子類繼承了基類 Base&#xff0c;分別是 private 繼承&#xff0c;protected 繼承&#xff0c;p…

基于springboot+vue的紡織品企業財務管理系統

博主主頁&#xff1a;貓頭鷹源碼 博主簡介&#xff1a;Java領域優質創作者、CSDN博客專家、阿里云專家博主、公司架構師、全網粉絲5萬、專注Java技術領域和畢業設計項目實戰&#xff0c;歡迎高校老師\講師\同行交流合作 ?主要內容&#xff1a;畢業設計(Javaweb項目|小程序|Pyt…

Socket網絡編程(五)——TCP數據發送與接收并行

目錄 主要實現需求TCP 服務端收發并行重構啟動main方法重構重構分離收發消息的操作重構接收消息的操作重構發送消息TCPServer調用發送消息的邏輯監聽客戶端鏈接邏輯重構Socket、流的退出與關閉 TCP 客戶端收發并行重構客戶端 main函數重構客戶端接收消息重構客戶端發送消息重構…

前端封裝通用下載方法及下載后端返回的文件流

目錄 1.下載方法封裝 2.將后端返回的文件流轉換為文件 3.總結 1.下載方法封裝 ①說明 前端的請求大概分為三種類型 普通請求&#xff1a;常用的get&#xff0c;post&#xff0c;put&#xff0c;delete等請求 上傳請求&#xff1a;使用post請求&#xff0c;發送formdata對…

Zookeeper學習1:概述、安裝、應用場景、集群配置

文章目錄 概述安裝LinuxWindows 配置參數集群參考配置文件配置步驟流程啟動 概述 Zookeeper&#xff1a; 為分布式框架組件提供協調服務的中間件 【類似&#xff1a;文件系統通知機制】 負責存儲上下層應用關系的數據以及接收觀察者注冊監聽&#xff0c;一旦觀察查關心的數據發…

git操作基本指令

1.查看用戶名 git config user.name 2.查看密碼 git config user.password 3.查看郵箱 git config user.email 4.修改用戶名 git config --global user.name "xxx(新用戶名)" 5.修改密碼 git config --global user.password "xxx(新密碼)" 6.修改…

筆記73:ROS中的各種消息包

參考視頻&#xff1a; 33.ROS 的標準消息包 std_msgs_嗶哩嗶哩_bilibili 34. ROS 中的幾何包 geometry_msgs 和 傳感器包 sensor_msgs_嗶哩嗶哩_bilibili 標準消息包&#xff1a;std_msgs常用消息包&#xff1a;common_msgs導航消息包&#xff1a;nav_msgs幾何消息包&#xf…

實戰分享:Tomcat打破雙親委派模型,實現Web應用獨立與安全隔離的奧秘

目錄 一、JVM 類加載機制 二、Tomcat 類加載器 2.2 findClass 介紹 3.2 loadClass 介紹 三、web應用隔離 3.1 Spring 加載問題 在開始文章內容之前&#xff0c;先來看三個問題 假如在 Tomcat 上運行了兩個 Web 應用程序&#xff0c;兩個 web 應用中有同名的Servlet&#xf…

C++數據結構與算法——二叉樹的屬性

C第二階段——數據結構和算法&#xff0c;之前學過一點點數據結構&#xff0c;當時是基于Python來學習的&#xff0c;現在基于C查漏補缺&#xff0c;尤其是樹的部分。這一部分計劃一個月&#xff0c;主要利用代碼隨想錄來學習&#xff0c;刷題使用力扣網站&#xff0c;不定時更…

AGI概念與實現

AGI AGI&#xff08;Artificial General Intelligence&#xff09;&#xff0c;中文名為“通用人工智能”或“強人工智能”&#xff0c;是指通過機器學習和數據分析等技術&#xff0c;使計算機具有類似于人類的認知和學習能力的技術. 多模態的大模型 &#xff08;Multimodal…

詳細介紹如何用windows自帶Hyper-V安裝虛擬機(windows11和ubuntu22)

通過系統自帶的hyper-v安裝windows11&#xff0c;舒服又愜意&#xff0c;相比用第三方虛擬機軟件速度快很多。 硬件準備 準備 系統需要符合能安裝 Hyper-V 的最低要求windows版本含Hyper-V的功能 電腦空間 電腦要有足夠的空間來安裝你這個虛擬機。根據自己的磁盤容量情況來規…