[github全教程]github版本控制最全教学------- 大厂找工作面试必备!

  • 作者:20岁爱吃必胜客(坤制作人),近十年开发经验, 跨域学习者,目前于新西兰奥克兰大学攻读IT硕士学位
  • 荣誉:阿里云博客专家认证、腾讯开发者社区优质创作者,在CTF省赛校赛多次取得好成绩。
  • 跨领域学习,喜欢摄影、弹吉他、咏春拳。文章深入浅出、语言风趣;爱吃必胜客社区创立者,旨在“发现美 欣赏美

  • 🏆 学习系列专栏
    。🏅 Python学习宝库
    。🏅 网络安全学习宝库

在这里插入图片描述

在这里插入图片描述

文章目录

  • ⭐️专业名词
    • 🌟 常用命令
    • 🌟 实践
  • ⭐️ssh- 证明你的身份github拥有者
    • 🌟 这个origin什么意思
      • ☀️git push -u origin master
      • ☀️一般流程
    • 🌟 分枝控制
      • ☀️main branch和 feature branch
  • ⭐️总结
    • 🌟

⭐️专业名词

在这里插入图片描述

🌟 常用命令

clone 下载项目
add 跟踪你的改变
commit 存到git上面
push 把本地git上传到远端-例如github, getlab, bitbucket
pull 把远端改变同步到本地

🌟 实践

zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]? y
 ~/Code/gitlea  on main +4 !4 ?6 ---------------------------------- at 17:13:04 
> 

 ~/Code/gitlea  on main +4 !4 ?6 ---------------------------------- at 17:13:04 
> git clone git@github.com:KrisQK/demo-repo.git
正克隆到 'demo-repo'...
Enter passphrase for key '/Users/liqikun/.ssh/id_rsa': 
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 6 (delta 0), reused 0 (delta 0), pack-reused 0
接收对象中: 100% (6/6), 完成.

 ~/Code/gitlea  on main +4 !4 ?7 ------------------------ took 36s  at 17:14:27 
> cd demo-repo 

 ~/Code/gitlea/demo-repo  on main --------------------------------- at 17:14:53 
> ls -la
total 8
drwxr-xr-x@  4 liqikun  staff  128 12  1 17:14 .
drwxr-xr-x   3 liqikun  staff   96 12  1 17:13 ..
drwxr-xr-x@ 12 liqikun  staff  384 12  1 17:14 .git
-rw-r--r--@  1 liqikun  staff   31 12  1 17:14 README.md

 ~/Code/gitlea/demo-repo  on main --------------------------------- at 17:16:11 
> git status
位于分支 main
您的分支与上游分支 'origin/main' 一致。

无文件要提交,干净的工作区

 ~/Code/gitlea/demo-repo  on main --------------------------------- at 17:17:14 
> git status
位于分支 main
您的分支与上游分支 'origin/main' 一致。

尚未暂存以备提交的变更:
  (使用 "git add <文件>..." 更新要提交的内容)
  (使用 "git restore <文件>..." 丢弃工作区的改动)
        修改:     README.md

修改尚未加入提交(使用 "git add" 和/或 "git commit -a")

 ~/Code/gitlea/demo-repo  on main !1 ------------------------------ at 17:18:05 
> git status
位于分支 main
您的分支与上游分支 'origin/main' 一致。

尚未暂存以备提交的变更:
  (使用 "git add <文件>..." 更新要提交的内容)
  (使用 "git restore <文件>..." 丢弃工作区的改动)
        修改:     README.md

未跟踪的文件:
  (使用 "git add <文件>..." 以包含要提交的内容)
        index.html

修改尚未加入提交(使用 "git add" 和/或 "git commit -a")

 ~/Code/gitlea/demo-repo  on main !1 ?1 --------------------------- at 17:23:11 
> git add .         

 ~/Code/gitlea/demo-repo  on main +2 ------------------------------ at 17:24:09 
> git status
位于分支 main
您的分支与上游分支 'origin/main' 一致。

要提交的变更:
  (使用 "git restore --staged <文件>..." 以取消暂存)
        修改:     README.md
        新文件:   index.html


 ~/Code/gitlea/demo-repo  on main +2 ------------------------------ at 17:24:13 
> 

⭐️ssh- 证明你的身份github拥有者

ssh-keygen -t rsa -b 4096 -C "q---@--.com"

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

🌟 这个origin什么意思

origin 是 Git 中默认使用的远程仓库的默认名称。它实际上是远程仓库的一个别名,用于简化对远程仓库的引用和操作

当你克隆一个远程仓库时(例如通过 git clone 命令),Git 会自动为这个远程仓库添加一个默认的别名叫做 origin。这样,你就可以使用 origin 作为对远程仓库的引用,而不必每次都输入完整的远程仓库 URL。

例如,当你执行 git push origin main 时,origin 代表着远程仓库的地址(如 github.com:KrisQK/demo-repo.git),让 Git 知道你想要将本地的 main 分支推送到 origin 所指向的远程仓库。

你也可以根据需要为其他远程仓库设置不同的别名,但通常情况下,origin 是默认使用的远程仓库别名,它指向最初克隆的远程仓库。

☀️git push -u origin master

这个命令通常用于将本地的 master 分支推送到名为 origin 的远程仓库。-u 参数将本地的 master 分支与远程的 origin/master 分支关联起来,并设置本地 master 分支在以后的推送中默认使用 origin master 作为默认远程分支

然而,在你之前提供的错误信息中,似乎出现了一个与 SSH 密钥相关的问题,导致 Git 无法进行远程推送。这个错误可能与权限问题有关,可能是因为 Git 无法找到或使用正确的 SSH 密钥来访问远程仓库。

在处理 SSH 密钥问题之前,推送到远程仓库可能会失败。确保你的 SSH 密钥正确设置并且可以被 Git 使用,然后再次尝试推送到远程仓库。

☀️一般流程

在这里插入图片描述

🌟 分枝控制

☀️main branch和 feature branch

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

⭐️总结

在这里插入图片描述


 ~/Code/gitlea ----------------------------------- at 21:15:37 
> git remote add origin git@github.com:KrisQK/demo-repo2.git

 ~/Code/gitlea ----------------------------------- at 21:33:18 
> git remote -v
origin  git@github.com:KrisQK/demo-repo2.git (fetch)
origin  git@github.com:KrisQK/demo-repo2.git (push)

 ~/Code/gitlea ----------------------------------- at 21:33:30 
> cd demo-repo2     

 ~/Code/gitlea/demo-repo2  on master ------------- at 21:34:00 
> git remote -v

 ~/Code/gitlea/demo-repo2  on master ------------- at 21:34:06 
> git remote add origin git@github.com:KrisQK/demo-repo2.git

 ~/Code/gitlea/demo-repo2  on master ------------- at 21:34:12 
> git remote -v                                             
origin  git@github.com:KrisQK/demo-repo2.git (fetch)
origin  git@github.com:KrisQK/demo-repo2.git (push)

 ~/Code/gitlea/demo-repo2  on master ------------- at 21:34:15 
> git push origin master
no such identity: /Users/liqikun/.ssh/id_ed25519: No such file or directory
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

 ~/Code/gitlea/demo-repo2  on master ---- took 3s  at 21:34:41 
> git push -u origin master
no such identity: /Users/liqikun/.ssh/id_ed25519: No such file or directory
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

 ~/Code/gitlea/demo-repo2  on master ---- took 3s  at 21:35:51 
> ssh-add ~/.ssh/qikunlikey
Identity added: /Users/liqikun/.ssh/qikunlikey (qikunli8866@gmail.com)

 ~/Code/gitlea/demo-repo2  on master ------------- at 21:47:33 
> ssh-add -l
4096 SHA256:dSBFeXTx5B0kYbqEpyddMfSrpMCDBhUHGMWkqfklKZE qikunli8866@gmail.com (RSA)

 ~/Code/gitlea/demo-repo2  on master ------------- at 21:48:10 
> git push -u origin master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 233 bytes | 233.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:KrisQK/demo-repo2.git
 * [new branch]      master -> master
branch 'master' set up to track 'origin/master'.

 ~/Code/gitlea/demo-repo2  on master ---- took 5s  at 21:51:26 
> cd ..

 ~/Code/gitlea ----------------------------------- at 00:00:42 
> cd demo-repo

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:00:54 
> ls
README.md  index.html

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:00:56 
> git branch

 ~/Code/gitlea/demo-repo  on main ------- took 7s  at 00:01:28 
> git checkout -b feature-readme-instructions
Switched to a new branch 'feature-readme-instructions'

 ~/C/g/demo-repo  on feature-readme-instructions - at 00:02:43 
> git branch

 ~/C/g/demo-repo  on feature-readme-instructions 
> git checkout main                        
Switched to branch 'main'
Your branch is up to date with 'origin/main'.

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:03:34 
> git checkout feature-readme-instructions 
Switched to branch 'feature-readme-instructions'

 ~/C/g/demo-repo  on feature-readme-instructions - at 00:03:54 
>                                          

 ~/C/g/demo-repo  on feature-readme-instructions - at 00:04:31 
> git status
On branch feature-readme-instructions
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:   README.md

no changes added to commit (use "git add" and/or "git commit -a")

 ~/C/g/demo-repo  on feature-readme-instructions !1 
> git add .

 ~/C/g/demo-repo  on feature-readme-instructions +1 
> git commit -m "updated readme"
[feature-readme-instructions e1737de] updated readme
 1 file changed, 4 insertions(+)

 ~/C/g/demo-repo  on feature-readme-instructions - at 00:07:20 
> git checkout master
error: pathspec 'master' did not match any file(s) known to git

 ~/C/g/demo-repo  on feature-readme-instructions - at 00:07:50 
> git checkout main  
Switched to branch 'main'
Your branch is up to date with 'origin/main'.

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:07:56 
> git diff feature-readme-instructions 

 ~/Code/gitlea/demo-repo  on main ------ took 22s  at 00:09:19 
> git checkout feature-readme-instructions 
Switched to branch 'feature-readme-instructions'

 ~/C/g/demo-repo  on feature-readme-instructions - at 00:10:14 
> git status
On branch feature-readme-instructions
nothing to commit, working tree clean

 ~/C/g/demo-repo  on feature-readme-instructions - at 00:10:20 
> git push
fatal: The current branch feature-readme-instructions has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin feature-readme-instructions

To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.


 ~/C/g/demo-repo  on feature-readme-instructions - at 00:10:33 
> git push -u origin feature-readme-instructions 
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 10 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 388 bytes | 388.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote: 
remote: Create a pull request for 'feature-readme-instructions' on GitHub by visiting:
remote:      https://github.com/KrisQK/demo-repo/pull/new/feature-readme-instructions
remote: 
To github.com:KrisQK/demo-repo.git
 * [new branch]      feature-readme-instructions -> feature-readme-instructions
branch 'feature-readme-instructions' set up to track 'origin/feature-readme-instructions'.

 ~/C/g/demo-repo  on feature-readme-instructions 
> git checkout main                             
Switched to branch 'main'
Your branch is behind 'origin/main' by 2 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

 ~/Code/gitlea/demo-repo  on main <2 ------------- at 00:37:23 
> git pull          
Updating 756290f..cb523b2
Fast-forward
 README.md | 4 ++++
 1 file changed, 4 insertions(+)

 ~/Code/gitlea/demo-repo  on main ------- took 6s  at 00:37:52 
> git branch

 ~/Code/gitlea/demo-repo  on main ------ took 15s  at 00:38:41 
> git branch -d feature-readme-instructions 
Deleted branch feature-readme-instructions (was e1737de).

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:38:48 
> git branch

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:38:56 
> 

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:38:57 
> git checkout -b quik-test
Switched to a new branch 'quik-test'

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 00:40:11 
> git status
On branch quik-test
nothing to commit, working tree clean

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 00:41:07 
> git status
On branch quik-test
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:   index.html

no changes added to commit (use "git add" and/or "git commit -a")

 ~/Code/gitlea/demo-repo  on quik-test !1 -------- at 00:41:15 
> git diff

 ~/C/gitlea/demo-repo  on quik-test !1 - took 23s  at 00:41:52 
> git commit -am "added world"
[quik-test f02e2b1] added world
 1 file changed, 2 insertions(+), 1 deletion(-)

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 00:43:16 
> git diff                    

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 00:50:44 
> git checkout master
error: pathspec 'master' did not match any file(s) known to git

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 00:52:56 
> git checkout main  
Switched to branch 'main'
Your branch is up to date with 'origin/main'.

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:53:00 
> git brach
git: 'brach' is not a git command. See 'git --help'.

The most similar command is
        branch

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:53:36 
> git branch

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:53:47 
> git checkout quick-test
error: pathspec 'quick-test' did not match any file(s) known to git

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:54:07 
> git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

 ~/Code/gitlea/demo-repo  on main ---------------- at 00:55:20 
> git commit -am "added there"
[main da2bbad] added there
 1 file changed, 2 insertions(+), 1 deletion(-)

 ~/Code/gitlea/demo-repo  on main >1 ------------- at 00:55:56 
> git checkout quik-test 
Switched to branch 'quik-test'

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 00:56:03 
> git diff main 

 ~/Code/gitlea/demo-repo  on quik-test - took 11s  at 00:56:24 
> git merge main 
Auto-merging index.html
CONFLICT (content): Merge conflict in index.html
Automatic merge failed; fix conflicts and then commit the result.

 ~/Code/gitlea/demo-repo  on quik-test merge ~1 -- at 00:56:30 
> git status
On branch quik-test
You have unmerged paths.
  (fix conflicts and run "git commit")
  (use "git merge --abort" to abort the merge)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
        both modified:   index.html

no changes added to commit (use "git add" and/or "git commit -a")

 ~/Code/gitlea/demo-repo  on quik-test merge ~1 -- at 01:00:50 
> git diff

 ~/C/g/demo-repo  on quik-test merge ~1 - took 6s  at 01:01:29 
> git commit -am "updated with main"
[quik-test bc3229d] updated with main

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 01:01:55 
> 

 ~/Code/gitlea/demo-repo  on quik-test !1 -------- at 01:02:52 
> git status
On branch quik-test
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:   README.md

no changes added to commit (use "git add" and/or "git commit -a")

 ~/Code/gitlea/demo-repo  on quik-test !1 -------- at 01:03:07 
> git add README.md 

 ~/Code/gitlea/demo-repo  on quik-test +1 -------- at 01:03:14 
> git status
On branch quik-test
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   README.md


 ~/Code/gitlea/demo-repo  on quik-test +1 -------- at 01:03:21 
> git reset
Unstaged changes after reset:
M       README.md

 ~/Code/gitlea/demo-repo  on quik-test !1 -------- at 01:04:33 
> git status
On branch quik-test
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:   README.md

no changes added to commit (use "git add" and/or "git commit -a")

 ~/Code/gitlea/demo-repo  on quik-test !1 -------- at 01:04:50 
> git add README.md 

 ~/Code/gitlea/demo-repo  on quik-test +1 -------- at 01:06:18 
> git commit -m "added install step"   
[quik-test 9d98358] added install step
 1 file changed, 2 insertions(+), 1 deletion(-)

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 01:06:53 
> git status
On branch quik-test
nothing to commit, working tree clean

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 01:06:59 
> git reset

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 01:07:09 
> 

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 01:07:55 
> git status
On branch quik-test
nothing to commit, working tree clean

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 01:08:00 
> git commit -m "added install step"
On branch quik-test
nothing to commit, working tree clean

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 01:08:24 
> git reset HEAD~1
Unstaged changes after reset:
M       README.md

 ~/Code/gitlea/demo-repo  on quik-test !1 -------- at 01:08:41 
> git status
On branch quik-test
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:   README.md

no changes added to commit (use "git add" and/or "git commit -a")

 ~/Code/gitlea/demo-repo  on quik-test !1 -------- at 01:08:56 
> git diff

 ~/Code/gitlea/demo-repo  on quik-test !1 -------- at 01:09:02 
> git log

 ~/C/g/demo-repo  on quik-test !1 --- took 1m 17s  at 01:10:39 
> git reset f02e2b173e2b4975f13e8495f1d5e569d438dcd0
Unstaged changes after reset:
M       README.md
M       index.html

 ~/Code/gitlea/demo-repo  on quik-test !2 -------- at 01:11:04 
> git log

 ~/C/gitlea/demo-repo  on quik-test !2 - took 39s  at 01:12:06 
> git reset --hard cb523b2177a7c45c672e088912df6f8e6bd95b65
HEAD is now at cb523b2 Merge pull request #1 from KrisQK/feature-readme-instructions

 ~/Code/gitlea/demo-repo  on quik-test ----------- at 01:12:35 
> 

🌟

在这里插入图片描述

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【笔记】2023最新Python安装教程(Windows 11)

&#x1f388;欢迎加群交流&#xff08;备注&#xff1a;csdn&#xff09;&#x1f388; ✨✨✨https://ling71.cn/hmf.jpg✨✨✨ &#x1f913;前言 作为一名经验丰富的CV工程师&#xff0c;今天我将带大家在全新的Windows 11系统上安装Python。无论你是编程新手还是老手&…

C语言错误处理之 “<errno.h>与<error.h>”

目录 前言 错误号处理方式 errno.h头文件 error.h头文件 参数解释&#xff1a; 关于的”__attribute__“解释&#xff1a; 关于“属性”的解释&#xff1a; 实例一&#xff1a; 实例二&#xff1a; error.h与errno.h的区别 补充内容&#xff1a; 前言 在开始学习…

Redis——某马点评day01——短信登录

项目介绍 导入黑马点评项目 项目架构 基于Session实现登录 基本流程 实现发送短信验证码功能 controller层中 /*** 发送手机验证码*/PostMapping("code")public Result sendCode(RequestParam("phone") String phone, HttpSession session) {// 发送短信…

支持Upsert、Kafka Connector、集成Airbyte,Milvus助力高效数据流处理

Milvus 已支持 Upsert、 Kafka Connector、Airbyte&#xff01; 在上周的文章中《登陆 Azure、发布新版本……Zilliz 昨夜今晨发生了什么&#xff1f;》&#xff0c;我们已经透露过 Milvus&#xff08;Zilliz Cloud&#xff09;为提高数据流处理效率&#xff0c; 先后支持了 Up…

JOSEF约瑟 DY-34 型电压继电器,15-30V 柜内安装,板前接线

DY-30系列电压继电器 DY-32电压继电器&#xff1b; DY-36电压继电器&#xff1b; DY-33电压继电器&#xff1b; DY-37电压继电器&#xff1b; DY-34电压继电器&#xff1b; DY-38电压继电器&#xff1b; DY-31电压继电器&#xff1b; DY-35电压继电器&#xff1b; DY-32/60C电压…

HarmonyOS——解决本地模拟器无法选择设备的问题

在使用deveco studio进行鸿蒙开发的时候&#xff0c;可能会遇到本地模拟器已经启动了&#xff0c;但是仍然无法选择本地模拟器中的设备&#xff0c;尤其在MAC环境中尤为常见。 解决办法&#xff1a; 先打开IDE启动本地模拟器&#xff0c;等模拟器启动后&#xff0c;退出IDE重新…

蓝桥杯每日一题2023.12.1

题目描述 蓝桥杯大赛历届真题 - C 语言 B 组 - 蓝桥云课 (lanqiao.cn) 题目分析 对于此题目而言思路较为重要&#xff0c;实际可以转化为求两个数字对应的操作&#xff0c;输出最前面的数字即可 #include<bits/stdc.h> using namespace std; int main() {for(int i 1…

ARM64版本的chrome浏览器安装

这一快比较玄学&#xff0c;花个半个小时左右才能安装好&#xff0c;也不知道是个什么情况。 sudo snap install chromium只需要以上这个命令&#xff0c;当然&#xff0c;也可以自己去找安装包进行安装&#xff0c;但是测试后发现并没有那么好装&#xff0c;主要是两个部分 一…

第九节HarmonyOS 常用基础组件-Text

一、组件介绍 组件&#xff08;Component&#xff09;是界面搭建与显示的最小单位&#xff0c;HarmonyOS ArkUI声名式为开发者提供了丰富多样的UI组件&#xff0c;我们可以使用这些组件轻松的编写出更加丰富、漂亮的界面。 组件根据功能可以分为以下五大类&#xff1a;基础组件…

Unity中Shader指令优化

文章目录 前言一、解析一下不同运算所需的指令数1、常数基本运算2、变量基本运算3、条件语句、循环 和 函数 前言 上一篇文章中&#xff0c;我们解析了Shader解析后的代码。我们在这篇文章中来看怎么实现Shader指令优化 Unity中Shader指令优化&#xff08;编译后指令解析&…

C语言之联合和枚举

C语言之联合和枚举 文章目录 C语言之联合和枚举1. 联合体1.1 联合体的声明1.2 联合体的特点1.3 结构体和联合体对比1.4 联合体大小的计算1.5 联合体小练习 2. 枚举2.1 枚举类型的声明2.2 枚举类型的优点2.3 枚举类型的使用 1. 联合体 1.1 联合体的声明 像结构体⼀样&#xff…

AI PC行业深度报告:格局演变、发展趋势、产业链及相关公司深度梳理

今天分享的是AI PC系列深度研究报告&#xff1a;《AI PC行业深度报告&#xff1a;格局演变、发展趋势、产业链及相关公司深度梳理》。 &#xff08;报告出品方&#xff1a;慧博智能投研&#xff09; 报告共计&#xff1a;21页 一、AI PC的产生 1、端侧 AI 是 AI 发展下一阶段…

【ASP.NET CORE】数据迁移 codefirst

已经写好实体类&#xff0c;使用add-migration生成数据迁移语句&#xff0c;注意如果项目中有多个dbcontext需要使用 -context 名称&#xff0c;指定下需要使用的dbcontext add-Migration Address -context mvcsqlcontext运行后会生成两个文件 2. 使用Update-Database语句更…

Postman如何导入和导出接口文件

本文介绍2种导出和导入的操作方法&#xff1a;一种是分享链接&#xff0c;导入链接的方式&#xff08;需要登录&#xff09;&#xff1b;另一种是导出json文件&#xff0c;再次导入。下面将详细介绍。 由于第一种分享链接&#xff0c;导入链接的方式需要登录&#xff0c;所以推…

Nacos 架构原理

基本架构及概念​ 服务 (Service)​ 服务是指一个或一组软件功能&#xff08;例如特定信息的检索或一组操作的执行&#xff09;&#xff0c;其目的是不同的客户端可以为不同的目的重用&#xff08;例如通过跨进程的网络调用&#xff09;。Nacos 支持主流的服务生态&#xff0c…

【每日一题】找出叠涂元素

文章目录 Tag题目来源题目解读解题思路方法一&#xff1a;哈希表 写在最后 Tag 【哈希表】【数组】【2023-12-01】 题目来源 2661. 找出叠涂元素 题目解读 从左往右遍历 arr 给矩阵 mat 上色&#xff0c;在上色的过程中矩阵的某一行或者某一列的全部被上色了&#xff0c;返回…

Git的介绍和下载安装

Git的介绍和下载安装 概述 Git是一个分布式版本控制工具, 通常用来管理项目中的源代码文件(Java类、xml文件、html页面等)进行管理,在软件开发过程中被广泛使用 Git可以记录文件修改的历史记录并形成备份从而实现代码回溯, 版本切换, 多人协作, 远程备份的功能Git具有廉价的…

leecode 【二】

相交链表 给你两个单链表的头节点 headA 和 headB &#xff0c;请你找出并返回两个单链表相交的起始节点。如果两个链表不存在相交节点&#xff0c;返回 null 。 图示两个链表在节点 c1 开始相交&#xff1a; 题目数据 保证 整个链式结构中不存在环。 注意&#xff0c;函数返…

(数据结构)顺序表的插入删除

#include<stdio.h> #include<stdlib.h> #define MAX 10 typedef struct {int data[MAX];int lenth; }List; //初始化 void CreateList(List* L) {L->lenth 0;for (int i 0; i < MAX; i){L->data[i] 0;} } //插入 int ListInsert(List* L,int i,int e) …
最新文章