pick c144c143930 Add DatabaseConnector interface, and move execute logic to StandardDatabaseConnector pick 26eb5180e88 fix unit test
# Rebase 8e684ae6bdf..26eb5180e88 onto 8e684ae6bdf (2 commands) # # Commands: # p, pick <commit> = use commit # r, reword <commit> = use commit, but edit the commit message # e, edit <commit> = use commit, but stop for amending # s, squash <commit> = use commit, but meld into previous commit # f, fixup [-C | -c] <commit> = like "squash" but keep only the previous # commit's log message, unless -C is used, in which case # keep only this commit's message; -c is same as -C but # opens the editor # x, exec <command> = run command (the rest of the line) using shell # b, break = stop here (continue rebase later with 'git rebase --continue') # d, drop <commit> = remove commit # l, label <label> = label current HEAD with a name # t, reset <label> = reset HEAD to a label # m, merge [-C <commit> | -c <commit>] <label> [# <oneline>] # create a merge commit using the original merge commit's # message (or the oneline, if no original merge commit was # specified); use -c <commit> to reword the commit message # u, update-ref <ref> = track a placeholder for the <ref> to be updated # to this position in the new commits. The <ref> is # updated at the end of the rebase # # These lines can be re-ordered; they are executed from top to bottom.
pick c144c143930 Add DatabaseConnector interface, and move execute logic to StandardDatabaseConnector s 26eb5180e88 fix unit test s 967ddd22efb fix unit test
修改完成后,需要执行以下命令,将修改添加进来,并继续 rebase 流程,如果处理不了冲突,则可以中断 rebase 流程。
1 2 3 4 5
git add . # 继续 rebase git rebase --continue # 中断 rebase git rebase --abort
# This is a combination of 3 commits. # This is the 1st commit message:
Add DatabaseConnector interface, and move execute logic to StandardDatabaseConnector
# This is the commit message #2:
fix unit test
# This is the commit message #3:
fix unit test
# Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Wed Nov 13 10:57:57 2024 +0800 # # interactive rebase in progress; onto 8e684ae6bdf # Last commands done (3 commands done): # squash 26eb5180e88 fix unit test # squash 967ddd22efb fix unit test # No commands remaining. # You are currently rebasing branch 'dev-1113' on '8e684ae6bdf'. # # Changes to be committed: # modified: proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/DatabaseConnector.java
此处我们将 fix unit test 都注释掉,并修改第一个 commit 信息,增加 modify test,修改完成后退出保存。
1 2 3 4 5 6 7 8 9 10 11 12
# This is a combination of 3 commits. # This is the 1st commit message:
Add DatabaseConnector interface, and move execute logic to StandardDatabaseConnector modify test
# This is the commit message #2:
# fix unit test
# This is the commit message #3:
# fix unit test
此时会提示 rebase 成功,并显示了新的 HEAD commit 信息。
1 2 3 4 5 6
[detached HEAD 552f1459fd4] Add DatabaseConnector interface, and move execute logic to StandardDatabaseConnector modify test Date: Wed Nov 13 10:57:57 2024 +0800 6 files changed, 433 insertions(+), 392 deletions(-) create mode 100644 proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/StandardDatabaseConnector.java rename proxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/{DatabaseConnectorTest.java => StandardDatabaseConnectorTest.java} (91%) Successfully rebased and updated refs/heads/dev-1113.
duanzhengqiang@duanzhengqiang-ubuntu:~/blog$ ssh -T -p 443 git@ssh.github.com The authenticity of host '[ssh.github.com]:443 ([20.205.243.160]:443)' can't be established. ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. This host key is known by the following other names/addresses: ~/.ssh/known_hosts:1: [hashed name] Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '[ssh.github.com]:443' (ED25519) to the list of known hosts. Hi strongduanmu! You've successfully authenticated, but GitHub does not provide shell access.
为了不影响工作效率,尝试将 SSH 替换为 HTTPS,参考 Managing your personal access tokens,点击个人头像下的 Settings,然后选择 Developer settings -> Personal access tokens -> Fine-grained personal access tokens Beta -> Generate new token,生成 token 如下图所示。