(图片来源:Github ™ 官网)
Git Apply 1 2 $ git apply --reject yuzhouwan.patch
Git Blame 1 2 3 $ git blame pom.xml ^e81ccde3 (BenedictJin 2018-06-04 11:16:19 +0800 1) <?xml version="1.0" encoding="UTF-8" ?>
Git Branch 1 2 3 4 5 6 7 8 9 10 11 12 $ git checkout -b <branch> $ git branch -m <old_name> <new_name> $ git branch -m <new_name> $ git reflog $ git branch <branch_name> <sha1>
Git Cache 1 2 3 4 5 6 7 $ git rm --cached <file> $ git rm --cached -f .idea/workspace.xml
Git Cherry-pick 1 2 $ git cherry-pick 5738c801c
Git Checkout checkout 的同时,创建新的 branch 1 $ git checkout -b <new_branch_new>
撤销某个文件的修改 1 $ git checkout -- <file>
Git Clone 1 2 3 4 5 $ git clone --depth 1 https://github.com/asdf2014/yuzhouwan $ git fetch --unshallow origin
Git Config 1 2 3 4 5 $ git config --global user.name "asdf2014" $ git config --global user.email "asdf2014@apache.org" $ git reset . $ git add -A $ git diff --staged
Git Commit Allow Empty 1 $ git commit --allow-empty -m 'yuzhouwan.com'
Commit Merge 常规操作 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 $ git log --pretty=oneline 651cc60d971aba93bdde645b6331c33068462645 Merge branch 'master' of https://github.com/asdf2014/superset 415610958494446ccd37c0c87da98eba56af42ac Merge branch 'temp' b881140282893fa4add183a2b3f2637968f95069 Merge branch 'master' into master f2bf3160583533bd0dc5004f248f81251aa8c57e Add NUMERIC num_type ( 6a0fefdbd542da4ea313313a191eadd1efe58faa Using the time zone with specific name for querying Druid 9cd38fa1eda63152c27b76c29dd948f29444b686 little code refactor in models.py ( $ git log --pretty=oneline --reverse $ git reset --soft HEAD~2 && $ git commit --edit -m "$($ git log --format=%B --reverse HEAD..HEAD@{1}) " [master fd41c16] Add NUMERIC num_type ( 1 file changed, 1 insertion(+), 1 deletion(-) fd41c1608579408fcd26d0dd03adf0d461599101 Add NUMERIC num_type ( 6a0fefdbd542da4ea313313a191eadd1efe58faa Using the time zone with specific name for querying Druid 9cd38fa1eda63152c27b76c29dd948f29444b686 little code refactor in models.py (
踩到的坑 Failed to push some refs 描述 1 2 3 4 5 6 7 8 Username for 'https://github.com' : asdf2014 To https://github.com/asdf2014/superset.git ! [rejected] ext_deprecation_warning -> ext_deprecation_warning (non-fast-forward) error: failed to push some refs to 'https://github.com/asdf2014/superset.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: '$ git pull ...' ) before pushing again. hint: See the 'Note about fast-forwards' in '$ git push --help' for details.
解决 1 2 $ git push -u origin ext_deprecation_warning --force
Commit Remove 1 2 $ git reset --hard <sha1-commit-id> $ git push origin HEAD --force
Commit Change 只修改最后一次提交 1 2 3 4 5 6 7 $ git commit --amend $ git commit --amend -m "New commit message" $ git commit --amend --author "Author Name <email@address.com>" $ git commit --amend -m 'remove warnings.simplefilter from cli.py into superset for PEP (#2137)' $ git commit --amend --author "asdf2014 <asdf2014@apache.org>"
修改之前的提交信息 1 2 3 $ git rebase -i HEAD~2 pick xxxx reword yyyy
修改提交的日期 1 2 3 4 5 6 7 8 9 $ date -R Mon, 07 Jan 2018 11:12:55 +0800 $ git commit --amend --date ="Mon, 07 Jan 2018 12:00:00 +0800" $ git commit --amend --date ="$(date -R) "
Reset into Specific Commit 1 2 3 4 5 $ git reset --hard c14809fa $ git reset --soft c14809fa
Squash Commits into a Single Commit 常规操作 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 $ git log --pretty=oneline $ git rebase -i HEAD~11 pick xxxx yyyy pick xxxx yyyy pick xxxx yyyy pick xxxx yyyy squash xxxx yyyy squash xxxx yyyy $ git commit --amend -m 'The log length has exceeded the limit of 4 MB in Travis' $ git push origin travis_log --force $ git rebase --continue $ git rebase --abort $ git rebase --help
其他 回滚 1 $ git reset --hard ORIG_HEAD
1 2 3 4 5 $ git commit -m "Something terribly misguided" $ git reset HEAD~ << edit files as necessary >> $ git add ... $ git commit -c ORIG_HEAD
指定 commit number 1 $ git rebase <commit number>
合并 branch 改动到 master 中 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 $ git checkout <branch name> $ git rebase -i master $ git rebase --root --onto master --preserve-merges $ git rebase --abort $ git checkout code_refactoring $ git checkout -b re2 $ git branch root bbb61e638b391d29 $ git checkout re2 $ git diff master > ../123.patch $ git checkout master $ git checkout -b r2 $ git apply ../123.patch $ git diff master $ git status $ git diff --name-status | wc -l $ git add . $ git status $ git diff master $ git commit -m 'Improve `collection` related things that reusing a immutable object instead of creating a new object' $ git status $ git push origin r2:code_refactoring -f
Git Diff Git diff two commits 1 $ git diff 1285c982 b0aaa7de > v3.4.6_vs_v3.4.10.patch
Git diff two branchs 1 $ git diff branch_1..branch_2
Git Fetch Normal 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 https://github.com/apache/superset https://github.com/asdf2014/superset (forked from apache/superset) $ git init $ git remote add origin https://github.com/asdf2014/superset.git $ git remote -v origin https://github.com/asdf2014/superset.git (fetch) origin https://github.com/asdf2014/superset.git (push) https://github.com/apache/superset/pull/2136 (Fix werkzeug instance was created twice in Debug Mode ( $ git fetch https://github.com/apache/superset.git master:tmp $ git diff tmp $ git merge tmp $ git branch -d tmp
1 2 3 4 5 $ git fetch --tags $ git checkout tags/release-3.4.6 $ git checkout master Previous HEAD position was 1285c982... ZooKeeper 3.4.6 release. Switched to branch 'master'
Git Merge 1 2 3 4 5 $ git merge $ git add . $ git merge --continue
Git Push 1 2 3 $ git push --set-upstream origin master $ git push
Git Reflog 恢复 git reset --hard
1 2 3 4 5 6 7 $ git reflog 2a93709d (HEAD -> yuzhouwan, origin/yuzhouwan) HEAD@{0}: reset: moving to 631cc5233063bb014587a9caf0c9e3095fe6a60e b5b67779 HEAD@{1}: commit: Something important $ git reset --hard b5b67779
Git Remote Change remote url 1 $ git remote set-url origin <url>
Pull specific tag from remote 1 $ git pull origin release-1.7.7:release-1.7.7
同时 push 到多个仓库 1 2 3 4 5 $ git remote set-url --add origin git@github.com:asdf2014/draft.git $ git remote -v origin https://git.coding.net/BenedictJin/test.git (fetch) origin https://git.coding.net/BenedictJin/test.git (push) origin git@github.com:asdf2014/test.git (push)
删除远程仓库
Git Reset 回退某一个文件的修改 1 $ git reset HEAD^ yuzhouwan.txt
Git Revert 创建某一个 commit 相反的 patch 1 $ git revert <commit number>
Git Rm 清理缓存 描述 某些已经被加到 .gitignore
的文件提示,ignored, tracked with git
解决 1 2 3 4 5 6 7 8 9 10 11 12 $ git rm --cached <file> $ git rm -r --cached . $ git add . $ git checkout -b tmp $ git commit -m 'Remove ignored files' $ git checkout master $ git branch -D tmp
Git Show 展示 commit 相关的信息 1 2 3 4 5 $ git init $ git remote add origin https://github.com/apache/druid.git $ git pull origin master $ git rev-list --max-parents=0 HEAD
1 70e993806e48fbd35ac597a4075d046a98c5b6ae
1 $ git show 70e993806e48fbd35ac597a4075d046a98c5b6ae
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 commit 70e993806e48fbd35ac597a4075d046a98c5b6ae Author: cheddar <echeddar@gmail.com> Date: Tue Oct 23 12:08:07 2012 -0700 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000000..ee3d794a1a --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +druid +===== + +Metamarkets Druid Data Store \ No newline at end of file
1 2 $ git show 70e993806e48fbd35ac597a4075d046a98c5b6ae -s --format=%cI
1 2012-10-23T12:08:07-07:00
1 2 $ git show `git rev-list --max-parents=0 HEAD` -s --format=%cI
展示 tag 相关的信息 1 2 3 4 5 $ git init $ git remote add origin https://github.com/apache/druid.git $ git fetch --tags $ git tag -l | sort -V | head -1
1 $ git show --format="%ai" druid-0.1.0 | head -5
1 2 3 4 5 tag druid-0.1.0 Tagger: Fangjin Yang <fangjin@metamarketsgroup.com> [maven-release-plugin] copy for tag druid-0.1.0 2012-11-09 09:32:57 -0800
Git Stash 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 $ git status On branch exception_governance Your branch is up to date with 'origin/exception_governance' . Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: a $ git stash Saved working directory and index state WIP on exception_governance: d5062a04 Govern old error codes and their exceptions $ git stash list stash@{0}: WIP on exception_governance: d5062a04 Govern old error codes and their exceptions $ git add . $ git diff --staged $ git stash pop On branch exception_governance Your branch is up to date with 'origin/exception_governance' . Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: a Dropped refs/stash@{0} (a88e4f6d681eb59b9b22e800f2c00f4c9e22d529)
Git Tag Create tag 1 2 3 4 5 6 7 8 9 10 11 $ git tag v0.0.1 $ git tag -a v0.0.2 -m "v0.0.2" $ git show v0.0.2 $ git tag -a v0.0.3 6d23400
Submit tag 1 2 3 4 $ git push origin v0.0.2 $ git push origin –tags
Pull with specific tag 1 2 3 4 5 6 7 8 $ git clone $ git tag -l $ git checkout tags/<tag_name> $ git checkout tags/<tag_name> -b <branch_name>
Delete tag 1 2 3 4 5 6 7 8 $ git tag -d v3.4.6.0 Deleted tag 'v3.4.6.0' (was 0e48a03a) $ git push origin :refs/tags/v3.4.6.0 To http://github.com/asdf2014/zookeeper.git - [deleted] v3.4.6.0
Git 代理 通过命令设置 1 2 3 4 $ git config --global http.proxy 'http://192.168.1.101:8888' $ git config --global https.proxy 'https://192.168.1.101:8888' $ git config --global http.proxy 'socks5://127.0.0.1:1080' $ git config --global https.proxy 'socks5://127.0.0.1:1080'
通过配置文件设置 1 2 3 4 5 6 7 8 9 $ vim ~/.ssh/config [http] proxy = http://192.168.1.101:8888 [https] proxy = https://192.168.1.101:8888
踩过的坑 SSL_ERROR_SYSCALL in connection to git.coding.net:443 描述 1 2 3 4 5 6 7 8 9 10 $ git push origin master Counting objects: 9, done . Delta compression using up to 4 threads. Compressing objects: 100% (9/9), done . Writing objects: 100% (9/9), 1.05 KiB | 1.05 MiB/s, done . Total 9 (delta 6), reused 0 (delta 0) error: RPC failed; curl 35 OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to git.coding.net:443 fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly Everything up-to-date
解决 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 $ git --version $ curl --version $ export GIT_CURL_VERBOSE=1 $ export GIT_TRACE_PACKET=2 $ git push origin master // ... error: RPC failed; curl 7 Failed to connect to 127.0.0.1 port 1080: Connection refused fatal: The remote end hung up unexpectedly Everything up-to-date
Git 中文乱码 1 2 3 4 5 6 7 8 9 10 $ git config --global core.quotepath false $ git config --global gui.encoding utf-8 $ git config --global i18n.commit.encoding utf-8 $ git config --global i18n.logoutputencoding utf-8 $ export LESSCHARSET=utf-8 $ vim %GIT_HOME%\mingw64\share\git\completion\git-completion.bash alias ls ="ls --show-control-chars --color"
Github 加速 1 2 3 4 5 6 7 8 9 10 11 12 13 14 192.30.253.112 github.com 151.101.56.133 assets-cdn.github.com 192.30.253.116 api.github.com 192.30.253.121 codeload.github.com 192.30.253.112 github.com 151.101.100.133 assets-cdn.github.com 192.30.253.116 api.github.com 192.30.253.121 codeload.github.com
Patch 1 2 $ git diff > patch.diff $ git apply patch.diff
SSH 免密 常规操作 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 $ mkdir ~/.ssh $ chmod 700 ~/.ssh $ cd ~/.ssh $ ssh-keygen -t rsa -C "asdf2014@apache.org" $ ssh -T git@github.com Hi asdf2014! You've successfully authenticated, but GitHub does not provide shell access. ' $ git remote -v origin https://github.com/asdf2014/yuzhouwan (fetch) origin https://github.com/asdf2014/yuzhouwan (push) $ git remote set-url origin git@github.com:asdf2014/yuzhouwan.git $ git remote -v origin git@github.com:asdf2014/yuzhouwan.git (fetch) origin git@github.com:asdf2014/yuzhouwan.git (push)
如何在代理环境下,同时支持 github / gitlab / coding 的免密操作 场景介绍
github.com
和 coding.net
需要走代理访问
gitlab
是自建的私服
PAC 配置 在任何 git 相关操作之前,需要先配置 PAC 文件,来保证本机网络的畅通
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 var domains = { "coding.net" : 1, "git.coding.net" : 1, "github.com" : 1, "ssh.github.com" : 1 }; var proxy = "__PROXY__" ; var direct = 'DIRECT;' ; var hasOwnProperty = Object.hasOwnProperty; function FindProxyForURL(url, host) { var suffix; var pos = host.lastIndexOf('.' ); pos = host.lastIndexOf('.' , pos - 1); while (1) { if (pos <= 0) { if (hasOwnProperty.call(domains, host)) { return proxy; } else { return direct; } } suffix = host.substring(pos + 1); if (hasOwnProperty.call(domains, suffix)) { return proxy; } pos = host.lastIndexOf('.' , pos - 1); } }
SSH 配置 在配置 SSH 之前,同样需要保证 ssh 命令使用的网络代理是正确的
首先,找到 connect
命令安装路径
1 2 3 4 5 $ which connect /mingw64/bin/connect $ which connect.exe /mingw64/bin/connect.exe
其次,修改 ~/.ssh/config
文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Host github.com User git Port 22 Hostname github.com IdentityFile ~/.ssh/id_rsa TCPKeepAlive yes IdentitiesOnly yes ProxyCommand /mingw64/bin/connect.exe -H 127.0.0.1:1080 %h %p Host ssh.github.com User git Port 443 Hostname ssh.github.com IdentityFile ~/.ssh/id_rsa TCPKeepAlive yes IdentitiesOnly yes ProxyCommand /mingw64/bin/connect.exe -H 127.0.0.1:1080 %h %p Host git.coding.net User <email> PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa TCPKeepAlive yes IdentitiesOnly yes ProxyCommand /mingw64/bin/connect.exe -H 127.0.0.1:1080 %h %p Host yuzhouwan.gitlab.com User git Port 22 Hostname yuzhouwan.gitlab.com IdentityFile ~/.ssh/id_rsa TCPKeepAlive yes IdentitiesOnly yes
然后,生成私钥、公钥,并分别拷贝公钥到 github
/ gitlab
/ coding
服务器中,具体操作见上文描述
最后,验证
1 2 3 4 5 6 7 8 9 $ ssh -T git@github.com Hi asdf2014! You've successfully authenticated, but GitHub does not provide shell access. $ ssh -T git@yuzhouwan.gitlab.com Welcome to GitLab, BenedictJin! $ ssh -T git@git.coding.net Coding 提示: Hello BenedictJin, You' ve connected to Coding.net via SSH. This is a personal key. BenedictJin,你好,你已经通过 SSH 协议认证 Coding.net 服务,这是一个个人公钥
保持从 fork 端更新代码 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 $ git remote add upstream git@gitlab.yuzhouwan.com:asdf2014/yuzhouwan.git $ git remote -v origin git@gitlab.yuzhouwan.com:asdf2018/yuzhouwan.git (fetch) origin git@gitlab.yuzhouwan.com:asdf2018/yuzhouwan.git (push) upstream git@gitlab.yuzhouwan.com:asdf2014/yuzhouwan.git (fetch) upstream git@gitlab.yuzhouwan.com:asdf2014/yuzhouwan.git (push) $ git fetch upstream $ git fetch upstream master $ git rebase upstream/master
代码风格配置 1 2 3 4 5 6 7 8 9 10 11 Intellij Idea File - Settings - Editor - Code Style - Schema - Manage - Import - Eclipse XML Profile File - Settings - Plugins - "CheckStyle-IDEA" File - Setting - Other Settings - Check Style(+) File - Settings - Editor - Inspections - Checkstyle real-time scan(√)
换行符 Auto CRLF 1 2 3 4 5 6 7 8 $ git config --global core.autocrlf true $ git config --global core.autocrlf input $ git config --global core.autocrlf false
Safe CRLF 1 2 3 4 5 6 7 8 $ git config --global core.safecrlf true $ git config --global core.safecrlf false $ git config --global core.safecrlf warn
设置编辑器 在 Mac 下设置 sublime 作为编辑器 1 2 3 4 5 6 7 $ vim ~/.gitconfig [core] editor = /Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl -n -w $ git config --global core.editor "/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n -w"
在 Windows 下设置 Notepad++ 作为编辑器 1 2 3 4 5 6 7 $ vim ~/.gitconfig [core] editor = 'D:/apps/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin $ git config --global core.editor "'D:/apps/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
GitHub CLI 安装 Windows 从 https://cli.github.com/ 官网下载安装包
MacOS 1 2 $ brew install gh $ gh version
升级 Windows Windows 用户可以到官网下载最新的安装包
MacOS MacOS 使用 brew 进行升级即可
1 2 $ brew update $ brew upgrade gh
登录 Github 账号
1 2 HTTP 401: Bad credentials (https://api.github.com/graphql) hint: try authenticating with `gh auth login`
1 2 3 4 5 6 7 8 9 10 11 12 13 ? What account do you want to log into? GitHub.com ? What is your preferred protocol for Git operations? SSH ? Upload your SSH public key to your GitHub account? /Users/asdf2014/.ssh/id_rsa.pub ? How would you like to authenticate GitHub CLI? Login with a web browser ! First copy your one-time code: B666-0000 - Press Enter to open github.com in your browser... ✓ Authentication complete. Press Enter to continue ... - gh config set -h github.com git_protocol ssh ✓ Configured git protocol ✓ Uploaded the SSH key to your GitHub account: /Users/asdf2014/.ssh/id_rsa.pub ✓ Logged in as asdf2014
获取 issue 列表
1 2 3 4 5 6 7 8 Showing 30 of 925 open issues in apache/druid
获取 PR 列表
1 2 3 4 5 6 7 Showing 30 of 71 open pull requests in apache/druid
切换到某一个 PR 中
1 2 3 4 5 6 7 8 remote: Enumerating objects: 44, done . remote: Counting objects: 100% (44/44), done . remote: Total 110 (delta 44), reused 44 (delta 44), pack-reused 66 Receiving objects: 100% (110/110), 43.63 KiB | 269.00 KiB/s, done . Resolving deltas: 100% (45/45), completed with 27 local objects. From https://github.com/apache/druid * [new ref] refs/pull/10524/head -> kafka-dynamic-scale-ingest-tasks Switched to branch 'kafka-dynamic-scale-ingest-tasks'
使用该命令后,会自动下载并切换到 PR 所对应的 branch 中
查看 PR 的 diff 内容
合并 PR
1 2 3 4 ? What merge method would you like to use? [Use arrows to move, type to filter] > Create a merge commit Rebase and merge Squash and merge
更多 更多使用技巧查看《GitHub CLI 文档 》
GitPod 重新显示被隐藏的菜单栏 使用 ⌘⇧P
快捷键打开 Command Palette(命令面板),然后搜索 Customize Layout
,再选择 Menu Bar
选项即可重新显示被隐藏的菜单栏
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 We periodically need to update the local cache. Please run: $ sdk update ================================================================================ Available Java Versions for Linux 64bit ================================================================================ Vendor | Use | Version | Dist | Status | Identifier -------------------------------------------------------------------------------- Corretto | | 20.0.2 | amzn | | 20.0.2-amzn | | 20.0.1 | amzn | | 20.0.1-amzn | | 17.0.8 | amzn | | 17.0.8-amzn | | 17.0.7 | amzn | | 17.0.7-amzn | | 11.0.20 | amzn | | 11.0.20-amzn | | 11.0.19 | amzn | | 11.0.19-amzn | | 8.0.382 | amzn | | 8.0.382-amzn | | 8.0.372 | amzn | | 8.0.372-amzn Dragonwell | | 17.0.7 | albba | | 17.0.7-albba | | 11.0.19 | albba | | 11.0.19-albba | | 8.0.372 | albba | | 8.0.372-albba | | 8.0.275 | albba | | 8.0.275-albba Gluon | | 22.1.0.1.r17 | gln | | 22.1.0.1.r17-gln | | 22.1.0.1.r11 | gln | | 22.1.0.1.r11-gln GraalVM CE | | 20.0.2 | graalce | | 20.0.2-graalce | | 20.0.1 | graalce | | 20.0.1-graalce | | 17.0.8 | graalce | | 17.0.8-graalce | | 17.0.7 | graalce | | 17.0.7-graalce GraalVM Oracle| | 20.0.2 | graal | | 20.0.2-graal | | 20.0.1 | graal | | 20.0.1-graal | | 17.0.8 | graal | | 17.0.8-graal | | 17.0.7 | graal | | 17.0.7-graal Java.net | | 22.ea.9 | open | | 22.ea.9-open | | 22.ea.8 | open | | 22.ea.8-open | | 22.ea.7 | open | | 22.ea.7-open | | 22.ea.6 | open | | 22.ea.6-open | | 22.ea.5 | open | | 22.ea.5-open | | 22.ea.4 | open | | 22.ea.4-open | | 22.ea.3 | open | | 22.ea.3-open | | 21.ea.34 | open | | 21.ea.34-open | | 21.ea.33 | open | | 21.ea.33-open | | 21.ea.32 | open | | 21.ea.32-open | | 21.ea.31 | open | | 21.ea.31-open | | 21.ea.30 | open | | 21.ea.30-open | | 21.ea.29 | open | | 21.ea.29-open | | 21.ea.28 | open | | 21.ea.28-open | | 20.0.2 | open | | 20.0.2-open | | 19.ea.1.pma | open | | 19.ea.1.pma-open JetBrains | | 17.0.8 | jbr | | 17.0.8-jbr | | 17.0.7 | jbr | | 17.0.7-jbr | | 11.0.14.1 | jbr | | 11.0.14.1-jbr Liberica | | 20.0.2.fx | librca | | 20.0.2.fx-librca | | 20.0.2 | librca | | 20.0.2-librca | | 20.0.1.fx | librca | | 20.0.1.fx-librca | | 20.0.1 | librca | | 20.0.1-librca | | 17.0.8.fx | librca | | 17.0.8.fx-librca | | 17.0.8 | librca | | 17.0.8-librca | | 17.0.7.fx | librca | | 17.0.7.fx-librca | | 17.0.7 | librca | | 17.0.7-librca | | 11.0.20.fx | librca | | 11.0.20.fx-librca | | 11.0.20 | librca | | 11.0.20-librca | | 11.0.19.fx | librca | | 11.0.19.fx-librca | | 11.0.19 | librca | | 11.0.19-librca | | 8.0.382.fx | librca | | 8.0.382.fx-librca | | 8.0.382 | librca | | 8.0.382-librca | | 8.0.372.fx | librca | | 8.0.372.fx-librca | | 8.0.372 | librca | | 8.0.372-librca Liberica NIK | | 23.r20 | nik | | 23.r20-nik | | 23.r17 | nik | | 23.r17-nik | | 23.0.1.r20 | nik | | 23.0.1.r20-nik | | 23.0.1.r17 | nik | | 23.0.1.r17-nik | | 22.3.3.r17 | nik | | 22.3.3.r17-nik | | 22.3.3.r11 | nik | | 22.3.3.r11-nik | | 22.3.2.r17 | nik | | 22.3.2.r17-nik | | 22.3.2.r11 | nik | | 22.3.2.r11-nik Mandrel | | 23.r20 | mandrel | | 23.r20-mandrel | | 23.r17 | mandrel | | 23.r17-mandrel | | 23.0.1.2.r20 | mandrel | | 23.0.1.2.r20-mandrel | | 23.0.1.2.r17 | mandrel | | 23.0.1.2.r17-mandrel | | 22.3.3.1.r17 | mandrel | | 22.3.3.1.r17-mandrel | | 22.3.2.1.r17 | mandrel | | 22.3.2.1.r17-mandrel Microsoft | | 17.0.8 | ms | | 17.0.8-ms | | 17.0.7 | ms | | 17.0.7-ms | | 11.0.20 | ms | | 11.0.20-ms | | 11.0.19 | ms | | 11.0.19-ms Oracle | | 20.0.2 | oracle | | 20.0.2-oracle | | 20.0.1 | oracle | | 20.0.1-oracle | | 17.0.8 | oracle | | 17.0.8-oracle | | 17.0.7 | oracle | | 17.0.7-oracle SapMachine | | 20.0.2 | sapmchn | | 20.0.2-sapmchn | | 20.0.1 | sapmchn | | 20.0.1-sapmchn | | 17.0.8 | sapmchn | | 17.0.8-sapmchn | | 17.0.7 | sapmchn | | 17.0.7-sapmchn | | 11.0.20 | sapmchn | | 11.0.20-sapmchn | | 11.0.19 | sapmchn | | 11.0.19-sapmchn Semeru | | 20.0.1 | sem | | 20.0.1-sem | | 17.0.7 | sem | | 17.0.7-sem | | 11.0.19 | sem | | 11.0.19-sem | | 8.0.372 | sem | | 8.0.372-sem Temurin | | 20.0.2 | tem | | 20.0.2-tem | | 20.0.1 | tem | | 20.0.1-tem | | 17.0.8 | tem | | 17.0.8-tem | | 17.0.7 | tem | | 17.0.7-tem | | 11.0.20 | tem | | 11.0.20-tem | | 11.0.19 | tem | | 11.0.19-tem | | 8.0.382 | tem | | 8.0.382-tem | | 8.0.372 | tem | | 8.0.372-tem Tencent | | 17.0.8 | kona | | 17.0.8-kona | | 17.0.7 | kona | | 17.0.7-kona | | 11.0.20 | kona | | 11.0.20-kona | | 11.0.19 | kona | | 11.0.19-kona | | 8.0.382 | kona | | 8.0.382-kona | | 8.0.372 | kona | | 8.0.372-kona Trava | | 11.0.15 | trava | | 11.0.15-trava | | 8.0.282 | trava | | 8.0.282-trava Unclassified| | 22.3.3.r17 | grl | | 22.3.3.r17-grl | | 22.3.3.r11 | grl | | 22.3.3.r11-grl Zulu | | 20.0.2 | zulu | | 20.0.2-zulu | | 20.0.2.fx | zulu | | 20.0.2.fx-zulu | | 20.0.1 | zulu | | 20.0.1-zulu | | 20.0.1.fx | zulu | | 20.0.1.fx-zulu | | 17.0.8 | zulu | | 17.0.8-zulu | | 17.0.8.crac | zulu | | 17.0.8.crac-zulu | | 17.0.8.fx | zulu | | 17.0.8.fx-zulu | | 17.0.7 | zulu | | 17.0.7-zulu | | 17.0.7.crac | zulu | | 17.0.7.crac-zulu | | 17.0.7.fx | zulu | installed | 17.0.7.fx-zulu | | 11.0.20 | zulu | | 11.0.20-zulu | | 11.0.20.fx | zulu | | 11.0.20.fx-zulu | | 11.0.19 | zulu | | 11.0.19-zulu | >>> | 11.0.19.fx | zulu | installed | 11.0.19.fx-zulu | | 8.0.382 | zulu | | 8.0.382-zulu | | 8.0.382.fx | zulu | | 8.0.382.fx-zulu | | 8.0.372 | zulu | | 8.0.372-zulu | | 8.0.372.fx | zulu | | 8.0.372.fx-zulu | | 7.0.352 | zulu | | 7.0.352-zulu | | 6.0.119 | zulu | | 6.0.119-zulu ================================================================================ Omit Identifier to install default version 17.0.8-tem: $ sdk install java Use TAB completion to discover available versions $ sdk install java [TAB] Or install a specific version by Identifier: $ sdk install java 17.0.8-tem Hit Q to exit this list view ================================================================================
1 $ sdk install java 20.0.2-oracle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 We periodically need to update the local cache. Please run: $ sdk update Downloading: java 20.0.2-oracle In progress... Repackaging Java 20.0.2-oracle... Done repackaging... Installing: java 20.0.2-oracle Done installing! Do you want java 20.0.2-oracle to be set as default? (Y/n): Y Setting java 20.0.2-oracle as default.
卸载 JDK 1 2 3 4 5 6 7 8 $ java -version $ sdk help uninstall $ sdk uninstall java 11.0.19.fx-zulu --force
开源社区里常用的英文缩写
缩写
全拼
含义
ACK
A cknowledgement
同意(改变 / 概念)
AFAICT
A s F ar A s I C an T ell
据我所知
AFAIK
A s F ar A s I K now
据我所知
AKA
A lso K nown A s
也称作
ASAP
A s S oon A s P ossible
尽快
BTW
B y T he W ay
顺便一提
CC
C arbon C opy
抄送
ETA
E stimated T ime O f A rrival
截止时间
FTW
F or T he W in
强烈推荐
FWIW
F or W hat I t´s W orth
无论如何
FWIAW
F or W hat I t´s A ll W orth
不管有没有用(FWIW 含义一样,且 FWIW 更常用一些)
FYI
F or Y our I nformation
供你参考
IANAL
I A m N ot A L awyer
我不是律师(但是我发现了一个问题)
IIRC
I f I R ecall C orrectly
如果我没有记错的话
IMHO
I n M y H umble O pinion
以我浅见
IMO
I n M y O pinion
我的想法是
LGTM
L ooks G ood t o M e
在我看来很好
MR
M erge R equest
Gitlab 中的代码提交申请
NACK / NAK
N egative A cknowledgement
不同意(改变 / 概念)
OTOH
O n T he O ther H and
另一方面
POC
P roof O f C oncept
验证思路的实验
PR
P ull R equest
Github 中的代码提交申请
PTAL
P lease T ake a L ook
请看一下
RC
R elease C andidate
正式发布前的候选版本
RFC
R equest F or C omments
征求意见
SGTM
S ounds G ood t o M e
听起来不错
TBD
T o B e D one
尚未完成
TBH
T o B e H onest
老实说
TBR
T o B e R eviewed
准备被审查
TIL
T oday I L earned
学到一个有趣的新知识
TL;DR
T oo L ong; D idn’t R ead
太长懒得看
WDYT
W hat D o Y ou T hink?
你怎么看?
WIP
W ork i n P rocessing
进行中
WTF
W hy T he F ace
你懂的
资料 Doc
Emoji
群名称
群号
人工智能(高级)
人工智能(进阶)
大数据
算法
数据库