主頁 >  其他 > Git:如何將專案中的檔案夾設定為與遠程分支中的檔案夾相同?

Git:如何將專案中的檔案夾設定為與遠程分支中的檔案夾相同?

2021-10-14 17:51:32 其他

我有一個feature/mine分支,我要合并到feature/other,但是地方發展程序中出現了在仍處于特定的檔案夾所做的更改feature/mine,不應該在feature/other因此,我的 PR 中的差異顯示了 中的更改src/some-folder-I-dont-want-to-change,但這些更改是在提交樹的深處進行的。我不能簡單地還原一些提交。

我想要的是簡單地將 my 設定src/some-folder-I-dont-want-to-changefeature/other's src/some-folder-I-dont-want-to-change有沒有辦法做到這一點?

我試過了,git checkout feature/other -- src/some-folder-I-dont-want-to-change但這只是從 中添加檔案feature/other,它不會洗掉我的分支上但不應該洗掉的檔案。

uj5u.com熱心網友回復:

聽起來您正在尋找git restore,例如參見https://stackoverflow.com/a/15404733/6060876

我相信對于您的用例,您需要撰寫如下內容:

git restore --source=feature/other --staged --worktree -- src/some-folder-I-dont-want-to-change

uj5u.com熱心網友回復:

TL; 博士

您可能只想從特定提交中檢出一些檔案,然后再次提交。然后,從合并基礎到您的分支提示的差異將不包括對這些檔案的任何更改,或者將對這些檔案進行相同的更改,具體取決于您的確切需求。可能會造成未來的問題,因此您需要注意這一點。

相反,您可能希望使用一些新的和改進的提交git rebase替換現有的提交。這比較復雜,可能會設定一些眼前的問題,但很可能會解決未來的問題。

您認為您的專案就好像它是一個簡單的檔案集合,但您使用的是 Git。Git 與檔案無關Git 是關于commits 的一次提交包含檔案——事實上,每個提交都有每個檔案的完整快照——但它一次提交,而不是一些檔案。然后有些人認為 Git 是關于分支的,但這也不對。分支幫助我們(和 Git)找到提交。但是 Git 是關于commits 的所以你需要在這里考慮提交,而不是檔案或檔案夾。

這并不能解決您的問題,但您需要了解所有相關資訊才能解決您的問題。所以繼續閱讀。

關于提交的知識

在 Git 中,提交是一個編號物體。每個提交都有一個唯一的編號,Git 將其稱為哈希 ID或有時稱為物件 ID但是,這些不是簡單的計數:它們不會提交 #1、#2、#3 等等。相反,每個提交的唯一編號是巨大的——在 1 到 2 160 -1 之間——而且顯然是隨機的,并且通常以十六進制表示,例如cefe983a320c03d7843ac78e73bd513a27806845.

這些數字對人類毫無用處(所以我們大多不使用它們——如果需要,您偶爾會使用剪切和粘貼的數字),但它們是 Git 實際查找提交的方式。所以 Git 會需要它們。稍后我們將看到您如何避免輸入它們。

這些編號的物體(這些提交)中的每一個都包含兩件事:

  • 每個提交都有每個檔案的完整快照。此快照是一種特殊的、只讀的、僅限 Git 的、壓縮和重復資料洗掉的形式。除了Git 本身之外,提交中的檔案不能被任何東西使用

  • 與快照分開,每個提交都有一些元資料,或關于提交本身的資訊:例如,誰做的(姓名和電子郵件)以及何時提交。

對 Git 本身至關重要的是,每個提交都保存了一些早期提交的原始哈希 ID 大多數提交——Git 稱之為普通提交的提交——持有前一個提交的哈希 ID。

這一切對你來說意味著你只需要告訴 Git最新提交的哈希 ID 假設我們畫這個,用大寫字母代表實際的提交哈希 ID,這太難看了。讓我們用H來代表最新的Hash ID:

              H

H的元資料中,Git 存盤了一些早期提交的原始哈希 ID。讓我們稱之為 commit G

          G <-H

通過讀取H,Git 將能夠獲得 的哈希 ID G,從而能夠讀取G. 所以我們說H 指向 G.

G它本身也是一個提交,所以它具有某個較早提交的哈希 ID F,而后者又具有另一個更早提交的哈希 ID:

... <-F <-G <-H

Hence, given the hash ID of the latest commit, Git can easily find every previous commit, all the way back in time. Git simply follows the backwards-pointing internal arrows, one step at a time.

Since H and G both have complete snapshots—in Git's special de-duplicated format, no less—Git can easily retrieve both G and H and compare them, to see what files changed, if any. That lets Git figure out what you did, if you made H, and show you changes. Git didn't store the changes, it just computes them when you ask it to show H, on the theory that showing the changes since G is more interesting than showing the raw contents of H.

In fact, it's not just the snapshot that's read-only: all parts of any commit are completely read-only. So these internal arrows, once a commit is made, are set that way forever.

Branch and other names

To do all this, though, Git needs to know the hash ID of that latest commit. This is where branch names enter the picture. We get a little lazy about drawing the arrows from commit to commit, and draw them like this:

...--F--G--H   <-- main

Here the name main points to commit H, the way H points to G. Unlike the arrows inside commits, though, the arrows coming from a branch name can change: we can make main point to G if we really want to. (That's a lot of what git reset is about, though I'm not going to cover it here.)

We can make more branch names. The only limit Git makes on our branch names is that they must point to actual commits. So we can have two names that both point to H, like this:

...--G--H   <-- develop, main

Now that we have more than one name, we need a way to remember which name we're using. Right now both names find commit H, so in some sense it doesn't matter which name we're using, but we are about to change that. So, to remember the name we're using, we'll attach the special name HEAD, written in all uppercase like this, to one branch name:

...--G--H   <-- develop, main (HEAD)

If we now use git switch develop or git checkout develop, we get:

...--G--H   <-- develop (HEAD), main

We are still using commit H, we're just doing that through the name develop now.

Besides branch names, Git lets us have tag names and remote-tracking names. These will generally also point to commits (though tag names often do so through an extra Git object, so as to be able to store annotations). I'll come back to this in a while.

Adding new commits: Git's index or staging area

When we make a new commit, we:

  1. use git checkout or git switch to pick a starting commit;
  2. modify some files and run git add on them;
  3. run git commit.

You might have wondered why we have to run git add over and over again: didn't Git get the memo about those files the first time?

The answer here has to do with Git's index. This part of Git is quite central and important, and Git forces you to know about it. Other version control systems may have something like the index, but keep it well hidden so that you don't have to care, but Git is very insistent here. (It's so important that it actually has three names: it's not just the index or staging area: Git sometimes calls it the cache. This is probably the worst of the three names, and is now mostly just found in flags like git rm --cached.)

Now, we already know that the snapshot inside a commit is read-only, and in fact only Git can read these files. So Git is going to have to copy the files from the commit into a more usable form. These usable copies live in what Git calls your working tree: the place you do your work.

That's pretty straightforward: "checking out" some commit means extract its files. What's not straightforward is that the way Git does this is in two steps:

  • First, Git "copies" the files to its index, removing from its index the files that are there from the previously checked out commit.

  • Then Git copies the files from the index to your working tree.

The word "copies" in the first step is in quotes because what Git puts in the index is in Git's compressed and de-duplicated format. Since these files all came out of some commit, they're automatically duplicates. That means they take no space.1 But still, they act like copies.

The copies in your working tree are ordinary files, in your computer's ordinary format, de-compressed, so they really are copies. And that's why you have to run git add so often.

What git add does is read the working tree version, compress and Git-ify it, and check to see if it's a duplicate. If it is a duplicate, there's already a copy of the data in the repository, and Git re-uses that copy. If it's not a duplicate, the compressed data are now ready to be the first copy, and Git uses that copy. Either way, Git now updates the index entry for the file and the file is ready to be committed.

So git add really means update my proposed next commit, and the index is really your proposed next commit. It starts out matching the current commit and as you git add files to it, you update the proposed commit.

This makes git commit's job faster and easier. When you run git commit:

  1. Git gathers any needed metadata, such as your name and email address and a log message, for the new commit. Git uses the current commit, as found by reading HEAD to see which branch name is the current branch, and reading the branch name to find out the commit's hash ID, as the parent for the new commit.

  2. Git turns the proposed commit, in the index, into an actual commit, using the metadata from step 1. Git writes all this out as a new commit object, into the big commit-objects-database. Since this is a new commit, it gets a new, unique, random-looking (but not random) hash ID: this is the first time Git actually finds the hash ID. Since the hash ID depends on all of the data—including not just your name and email address, but also the exact second at which you make the commit—there's no way to know in advance what the hash ID would be.

  3. As its last trick, git commit writes the new commit's hash ID into the current branch name.

The result is that we go from:

...--G--H   <-- develop (HEAD), main

to:

...--G--H   <-- main
         \
          I   <-- develop (HEAD)

where commit I is our new commit.

If we now run git checkout main, Git will remove, from its index and our working tree, all the files that are in commit I—they're safely saved forever2 in that commit—and fill in its index and our working tree from the files saved in commit H.3


1There's some space per index entry for the file's name, mode, cache data, and hash ID. The actual amount varies, but averages a bit under 100 bytes per file in a lot of cases.

2Forever, or as long as the commit itself exists, that is.

3Git plays a bunch of speed and cleverness tricks here: it can tell, easily, which files are different in H and I, and can skip the remove-and-replace for any files that aren't different. When taken to the extreme of switching between branch names that all point to the same commit, this makes git checkout or git switch really fast, as nothing actually changes except the binding of HEAD. It also means that we can switch branches with uncommitted work lying around, since Git won't have to swap out the files.


How branches grow; merging

This shows us how branches grow. We might start with:

...--G--H   <-- main

From here, we create two new branch names, feature1 and feature2 or feature/tall and feature/short or whatever. I'll just use br1 and br2:

...--G--H   <-- main, br1, br2

We pick br1 to be "on", check it out, and make two new commits:

          I--J   <-- br1 (HEAD)
         /
...--G--H   <-- main, br2

Now we check out br2 and make two other new commits:

          I--J   <-- br1
         /
...--G--H   <-- main
         \
          K--L   <-- br2 (HEAD)

We'll stop bothering to draw in the name main in a moment: it's not important, since what matters to Git are the commits. Note that commits up through H are on all three branches, while commits I-J are only on br1 and commits K-L are only on br2.

Let's now check out br1 and run git merge br2, and look very quickly at how git merge works:

          I--J   <-- br1 (HEAD)
         /
...--G--H
         \
          K--L   <-- br2

The git merge command needs to combine work. To do so, it has to find a common starting point: the best commit that's on both branches. Git will do the usual work-backwards-from-the-end thing to do this. (Technically Git uses the Lowest Common Ancestor algorithm for this, using the extension to DAGs.) In this case the best shared commit is obvious by eyeball though: it's commit H.

In order to combine work, Git has to figure out changes. To do that, Git will run git diff on two commits at a time. We start with:

git diff --find-renames <hash-of-H> <hash-of-J>   # what we changed

By comparing the snapshots in H and J, Git can figure out what files we modified, and what we did to those files.

Next, Git repeats this diff, this time from H to L:

git diff --find-renames <hash-of-H> <hash-of-L>   # what they changed

Again Git gets a list of files that were changed, and what happened to them.

The job of git merge is now to combine these changes. Git should then apply the combined changes to the base version.

For a file that we changed, and they didn't, that's easy: take our changes—or our version of that file from our commit. In other words, "file from H, plus our changes, equals file from J" so Git can just take the file from J. This applies even if we create a new file from whole cloth, for instance: if we added a file, and they didn't, Git can just take ours.

For a file that nobody changed, Git can take any version, as they're all the same.

For a file that they changed and we didn't, Git can just take their version. This also applies to files they deleted, that we didn't, for instance: Git can just delete the file.

Only when both of us changed the same file does it get a little tricky. Git now really does have to combine the two sets of changes. This can produce a merge conflict, if we both touched the same original lines. (I'm skipping over a lot of finicky details here too.)

Assuming all goes well, though, Git simply combines all of our and their changes, applies those combined changes to the files from H, and makes a new merge commit from the result. This new merge commit has a single snapshot—just like any commit—but instead of having a single parent, Git adds, to the usual single parent, a second parent. New merge commit M points back to commit J, like a regular commit would, but then also points to L:

          I--J
         /    \
...--G--H      M   <-- br1 (HEAD)
         \    /
          K--L   <-- br2

Then, having written out merge commit M, Git writes its hash ID into the current branch name—br1, where `HEAD is attached—as usual, and our merge is done.

Your situation

I have a feature/mine branch that I want to merge into feature/other, however somewhere during development there were changes made in specific folders that are still in feature/mine and should not be in feature/other. So, the diff in my PR shows changes in src/some-folder-I-dont-want-to-change, but these changes were made deep down the commit tree. I can't simply revert some commits.

At this point you're talking about a GitHub pull request, rather than a Git merge. GitHub PRs are specific to GitHub. Bitbucket also have Pull Requests, and I'm the one who added github to your post, so perhaps you're actually talking about a Bitbucket pull request. Fortunately, while some details are different, the overall setup is the same here. (GitLab call theirs merge requests, and again, there are some differences in detail, but overall the idea is the same.)

To make a GitHub PR, you:

  • send your new commits to some repository on GitHub: either a GitHub fork, or a shared repository (it doesn't really matter which); then
  • use a GitHub web page clicky button, or the gh CLI script, to create the pull request: this generates a test merge on GitHub to see if the merge will work, and if not, they tell you about merge conflicts.

To make that test merge, GitHub:

  • found a merge base commit;
  • did a test merge, which presumably worked;
  • is now showing that you've changed some files in src/some-folder-I-dont-want-to-change

Assuming that you didn't change those files yourself, what that means is that the merge base that GitHub are using here is such that the common starting point comes before someone else changed those files.

That is, suppose you have:

         J   <-- feature/mine (HEAD)
        /
       I   <-- feature/third
      /
...--H
      \
       K--L   <-- origin/feature/other

where you made one commit J that changes files that aren't in this src/some-folder-I-dont-want-to-change location. The comparison between H and J, however, includes commit I.

Meanwhile, the comparison from H to L doesn't include any changes to src/some-folder-I-dont-want-to-change.

Your PR therefore shows changes to src/some-folder-I-dont-want-to-change.

You can, if you wish, obtain commit L—that's their most recent commit—and extract from it all the files that are in src/some-folder-I-dont-want-to-change, in that form, and commit the result:

         J--M   <-- feature/mine (HEAD)
        /
       I   <-- feature/third
      /
...--H
      \
       K--L   <-- origin/feature/other

Now, a comparison from H to M shows no changes to src/some-folder-I-dont-want-to-change. The problem is, your branch name feature/mine now means commit M, which—by going back one hop at a time—includes commit I, which means you have now backed out the changes from feature/third. That is, your commit M might as well be a revert.

If they (whoever they are) accept your updated PR, with its proposed merge of M into L, the result will include commit I, provided they use the MERGE button on GitHub. GitHub have three different clicky web buttons here:

  • MERGE: this does an actual Git merge. You've now set things up so that Git will believe that commit I is properly incorporated. This means whoever did make commit I has to re-do their work. That's the future time-bomb.

  • REBASE AND MERGE: this makes the Git software on GitHub copy each commit in the PR to a new-and-supposedly-improved commit. This will have a similar effect, though it changes how whoever did make commit I has to handle things.

  • SQUASH AND MERGE: this doesn't create a merge at all. This prevents this particular time-bomb. They replace all of "your" commits—including the commit I that you inherited from someone else—with a single commit. The effect is that whoever did make commit I doesn't have to re-make it, because nobody will ever see your commits J and M in the end (and you'll have to discard your branch, as with any squash).

Understanding how and why this works is the key here. If you're going to set up a future time-bomb, whoever made the commit that you are in effect reverting needs to know about this. If you're using the squash-and-merge method (which has other drawbacks), that has the beneficial side effect of defusing this entirely.

Side note: origin/feature/other

The name origin/feature/other is a remote-tracking name. This has the same effect as a branch name, in terms of finding commits. The key difference between a branch name and a remote-tracking name is that the latter is something your Git creates to remember some other Git repository's branch name. You cannot switch to a remote-tracking name (git checkout produces a detached HEAD, and git switch produces an error).

When you run git fetch to obtain commits from some other Git repository, your Git reads that other Git's branch names. To keep your branch names yours—to avoid overwriting yours with theirs—your Git software renames their branch names. Your Git then creates or updates these remote-tracking names instead. The remote-tracking name, such as origin/main or origin/develop or whatever, has the name of the remote origin stuck in front of it: hence the term remote-tracking name. (The Git documentation calls these remote-tracking branch names but I find the word branch here to have negative value: removing it produces an improved term.)

Rebasing

Assuming this diagram, or a similar one:

         J--M--N   <-- feature/mine (HEAD)
        /
       I   <-- feature/third
      /
...--H
      \
       K--L   <-- origin/feature/other

captures the real problem, you have another alternative. You can replace your existing commits J-M-N with new-and-improved commits that start from H, rather than from I. The git rebase command assists with this.

To do this, you would want to run:

git switch feature/mine
git rebase --onto <hash-of-H> feature/third

If the name main points to commit H, you could use:

git switch feature/mine
git rebase --onto main feature/third

You could use the raw hash ID of commit I rather than the name feature/third here as well. The general idea is that we want to tell git rebase two things:

  1. Put the copies after commit H: that's why we need the hash of commit H, or the name main. Anything that locates the right commit will work here.

  2. Using the current branch, copy commits, but don't copy commit I or anything earlier than I. Anything that locates commit I suffices here: the name feature/third does it, but so does the raw hash ID of commit I itself.

The rebase command will start at the current commit, here N, and work backwards until it reaches commits that are to be excluded from the copying: in this case, commit I and earlier commits. These are the candidates for copying.4 It then puts the to-be-copied commits into the right order, saving their actual hash IDs in a work-list. (An interactive rebase, git rebase -i, allows you to edit the work list, but you probably don't want that here.)

Once the list is ready, git rebase uses Git's detached HEAD mode to copy each to-be-copied commit, one at a time. Rather than detail how this works—though I will say here that it uses git cherry-pick or equivalent—I'll just draw the final result that you get if all goes well:

         J--M--N   [abandoned]
        /
       I   <-- feature/third
      /
...--H--J'-M'-N'   <-- feature/mine (HEAD)
      \
       K--L   <-- origin/feature/other

This final result has copies of your commits, but omits the not-copied I commit. So you no longer have any changes to the files you didn't change: your three—or however many—commits start from the same base commit as origin/feature/other. So if you now use git push --force to update your GitHub PR, the apparent changes to these other files will vanish.

No matter what merge strategy someone uses, the merge won't include any changes to these other files, and there is no time-bomb set up. So this method is often superior. This is what git rebase is for: to set up new-and-improved commits that do only what you want done.


4This candidates list is normally further winnowed by:

  • removing any merge commits;
  • removing from the list commits whose patch IDs match those in the upstream; and
  • using the fork-point trick if --fork-point is enabled.

In this case, none of these should have much effect. If you have merge commits in the list, though, things get much more complicated.

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/313257.html

標籤:混帐 github 位桶

上一篇:TerraformCICD流水線GCP

下一篇:為什么在使用Heroku部署應用程式時需要設定AWS和POSTgresdb?

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 網閘典型架構簡述

    網閘架構一般分為兩種:三主機的三系統架構網閘和雙主機的2+1架構網閘。 三主機架構分別為內端機、外端機和仲裁機。三機無論從軟體和硬體上均各自獨立。首先從硬體上來看,三機都用各自獨立的主板、記憶體及存盤設備。從軟體上來看,三機有各自獨立的作業系統。這樣能達到完全的三機獨立。對于“2+1”系統,“2”分為 ......

    uj5u.com 2020-09-10 02:00:44 more
  • 如何從xshell上傳檔案到centos linux虛擬機里

    如何從xshell上傳檔案到centos linux虛擬機里及:虛擬機CentOs下執行 yum -y install lrzsz命令,出現錯誤:鏡像無法找到軟體包 前言 一、安裝lrzsz步驟 二、上傳檔案 三、遇到的問題及解決方案 總結 前言 提示:其實很簡單,往虛擬機上安裝一個上傳檔案的工具 ......

    uj5u.com 2020-09-10 02:00:47 more
  • 一、SQLMAP入門

    一、SQLMAP入門 1、判斷是否存在注入 sqlmap.py -u 網址/id=1 id=1不可缺少。當注入點后面的引數大于兩個時。需要加雙引號, sqlmap.py -u "網址/id=1&uid=1" 2、判斷文本中的請求是否存在注入 從文本中加載http請求,SQLMAP可以從一個文本檔案中 ......

    uj5u.com 2020-09-10 02:00:50 more
  • Metasploit 簡單使用教程

    metasploit 簡單使用教程 浩先生, 2020-08-28 16:18:25 分類專欄: kail 網路安全 linux 文章標簽: linux資訊安全 編輯 著作權 metasploit 使用教程 前言 一、Metasploit是什么? 二、準備作業 三、具體步驟 前言 Msfconsole ......

    uj5u.com 2020-09-10 02:00:53 more
  • 游戲逆向之驅動層與用戶層通訊

    驅動層代碼: #pragma once #include <ntifs.h> #define add_code CTL_CODE(FILE_DEVICE_UNKNOWN,0x800,METHOD_BUFFERED,FILE_ANY_ACCESS) /* 更多游戲逆向視頻www.yxfzedu.com ......

    uj5u.com 2020-09-10 02:00:56 more
  • 北斗電力時鐘(北斗授時服務器)讓網路資料更精準

    北斗電力時鐘(北斗授時服務器)讓網路資料更精準 北斗電力時鐘(北斗授時服務器)讓網路資料更精準 京準電子科技官微——ahjzsz 近幾年,資訊技術的得了快速發展,互聯網在逐漸普及,其在人們生活和生產中都得到了廣泛應用,并且取得了不錯的應用效果。計算機網路資訊在電力系統中的應用,一方面使電力系統的運行 ......

    uj5u.com 2020-09-10 02:01:03 more
  • 【CTF】CTFHub 技能樹 彩蛋 writeup

    ?碎碎念 CTFHub:https://www.ctfhub.com/ 筆者入門CTF時時剛開始刷的是bugku的舊平臺,后來才有了CTFHub。 感覺不論是網頁UI設計,還是題目質量,賽事跟蹤,工具軟體都做得很不錯。 而且因為獨到的金幣制度的確讓人有一種想去刷題賺金幣的感覺。 個人還是非常喜歡這個 ......

    uj5u.com 2020-09-10 02:04:05 more
  • 02windows基礎操作

    我學到了一下幾點 Windows系統目錄結構與滲透的作用 常見Windows的服務詳解 Windows埠詳解 常用的Windows注冊表詳解 hacker DOS命令詳解(net user / type /md /rd/ dir /cd /net use copy、批處理 等) 利用dos命令制作 ......

    uj5u.com 2020-09-10 02:04:18 more
  • 03.Linux基礎操作

    我學到了以下幾點 01Linux系統介紹02系統安裝,密碼啊破解03Linux常用命令04LAMP 01LINUX windows: win03 8 12 16 19 配置不繁瑣 Linux:redhat,centos(紅帽社區版),Ubuntu server,suse unix:金融機構,證券,銀 ......

    uj5u.com 2020-09-10 02:04:30 more
  • 05HTML

    01HTML介紹 02頭部標簽講解03基礎標簽講解04表單標簽講解 HTML前段語言 js1.了解代碼2.根據代碼 懂得挖掘漏洞 (POST注入/XSS漏洞上傳)3.黑帽seo 白帽seo 客戶網站被黑帽植入劫持代碼如何處理4.熟悉html表單 <html><head><title>TDK標題,描述 ......

    uj5u.com 2020-09-10 02:04:36 more
最新发布
  • 2023年最新微信小程式抓包教程

    01 開門見山 隔一個月發一篇文章,不過分。 首先回顧一下《微信系結手機號資料庫被脫庫事件》,我也是第一時間得知了這個訊息,然后跟蹤了整件事情的經過。下面是這起事件的相關截圖以及近日流出的一萬條資料樣本: 個人認為這件事也沒什么,還不如關注一下之前45億快遞資料查詢渠道疑似在近日復活的訊息。 訊息是 ......

    uj5u.com 2023-04-20 08:48:24 more
  • web3 產品介紹:metamask 錢包 使用最多的瀏覽器插件錢包

    Metamask錢包是一種基于區塊鏈技術的數字貨幣錢包,它允許用戶在安全、便捷的環境下管理自己的加密資產。Metamask錢包是以太坊生態系統中最流行的錢包之一,它具有易于使用、安全性高和功能強大等優點。 本文將詳細介紹Metamask錢包的功能和使用方法。 一、 Metamask錢包的功能 數字資 ......

    uj5u.com 2023-04-20 08:47:46 more
  • vulnhub_Earth

    前言 靶機地址->>>vulnhub_Earth 攻擊機ip:192.168.20.121 靶機ip:192.168.20.122 參考文章 https://www.cnblogs.com/Jing-X/archive/2022/04/03/16097695.html https://www.cnb ......

    uj5u.com 2023-04-20 07:46:20 more
  • 從4k到42k,軟體測驗工程師的漲薪史,給我看哭了

    清明節一過,盲猜大家已經無心上班,在數著日子準備過五一,但一想到銀行卡里的余額……瞬間心情就不美麗了。最近,2023年高校畢業生就業調查顯示,本科畢業月平均起薪為5825元。調查一出,便有很多同學表示自己又被平均了。看著這一資料,不免讓人想到前不久中國青年報的一項調查:近六成大學生認為畢業10年內會 ......

    uj5u.com 2023-04-20 07:44:00 more
  • 最新版本 Stable Diffusion 開源 AI 繪畫工具之中文自動提詞篇

    🎈 標簽生成器 由于輸入正向提示詞 prompt 和反向提示詞 negative prompt 都是使用英文,所以對學習母語的我們非常不友好 使用網址:https://tinygeeker.github.io/p/ai-prompt-generator 這個網址是為了讓大家在使用 AI 繪畫的時候 ......

    uj5u.com 2023-04-20 07:43:36 more
  • 漫談前端自動化測驗演進之路及測驗工具分析

    隨著前端技術的不斷發展和應用程式的日益復雜,前端自動化測驗也在不斷演進。隨著 Web 應用程式變得越來越復雜,自動化測驗的需求也越來越高。如今,自動化測驗已經成為 Web 應用程式開發程序中不可或缺的一部分,它們可以幫助開發人員更快地發現和修復錯誤,提高應用程式的性能和可靠性。 ......

    uj5u.com 2023-04-20 07:43:16 more
  • CANN開發實踐:4個DVPP記憶體問題的典型案例解讀

    摘要:由于DVPP媒體資料處理功能對存放輸入、輸出資料的記憶體有更高的要求(例如,記憶體首地址128位元組對齊),因此需呼叫專用的記憶體申請介面,那么本期就分享幾個關于DVPP記憶體問題的典型案例,并給出原因分析及解決方法。 本文分享自華為云社區《FAQ_DVPP記憶體問題案例》,作者:昇騰CANN。 DVPP ......

    uj5u.com 2023-04-20 07:43:03 more
  • msf學習

    msf學習 以kali自帶的msf為例 一、msf核心模塊與功能 msf模塊都放在/usr/share/metasploit-framework/modules目錄下 1、auxiliary 輔助模塊,輔助滲透(埠掃描、登錄密碼爆破、漏洞驗證等) 2、encoders 編碼器模塊,主要包含各種編碼 ......

    uj5u.com 2023-04-20 07:42:59 more
  • Halcon軟體安裝與界面簡介

    1. 下載Halcon17版本到到本地 2. 雙擊安裝包后 3. 步驟如下 1.2 Halcon軟體安裝 界面分為四大塊 1. Halcon的五個助手 1) 影像采集助手:與相機連接,設定相機引數,采集影像 2) 標定助手:九點標定或是其它的標定,生成標定檔案及內參外參,可以將像素單位轉換為長度單位 ......

    uj5u.com 2023-04-20 07:42:17 more
  • 在MacOS下使用Unity3D開發游戲

    第一次發博客,先發一下我的游戲開發環境吧。 去年2月份買了一臺MacBookPro2021 M1pro(以下簡稱mbp),這一年來一直在用mbp開發游戲。我大致分享一下我的開發工具以及使用體驗。 1、Unity 官網鏈接: https://unity.cn/releases 我一般使用的Apple ......

    uj5u.com 2023-04-20 07:40:19 more