├── spec ├── positioner_spec.ts ├── helpers │ └── dependencies.js ├── support │ └── jasmine.json └── base_spec.mjs ├── babel.config.json ├── images ├── 75572.png ├── graph.jpg ├── graph3.gif ├── vRice.jpg ├── vCanvas.jpg ├── 10GraphSMA.jpg ├── vLegalPad.jpg ├── legal_pad_23.jpg ├── tn_graphpaper.gif └── tn_notepaper.gif ├── .travis.yml ├── git-cheatsheet ├── images │ └── vCanvas.jpg ├── fonts │ └── Impact-Label-fontfacekit │ │ ├── Impact_label-webfont.eot │ │ ├── Impact_label-webfont.ttf │ │ ├── Impact_label-webfont.woff │ │ ├── Impact_label_reversed-webfont.eot │ │ ├── Impact_label_reversed-webfont.ttf │ │ ├── Impact_label_reversed-webfont.woff │ │ ├── stylesheet.css │ │ ├── Tension Type Font License.txt │ │ └── demo.html └── lang │ ├── zh-cn.json │ ├── zh-tw.json │ ├── ko.json │ ├── es.json │ ├── de.json │ ├── fr.json │ ├── it.json │ ├── pt.json │ ├── vi.json │ ├── en.json │ └── ru.json ├── Dockerfile ├── .gitignore ├── .editorconfig ├── git-cheatsheet.htm ├── .yarnrc.yml ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── workflows │ └── node.js.yml ├── src ├── cookies.mjs ├── base.mjs ├── lib │ ├── 1200.css │ └── csster.js ├── commands.mjs ├── build-styles.js └── git-cheatsheet.js ├── LICENSE.txt ├── package.json ├── .circleci └── config.yml └── README.md /spec/positioner_spec.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /images/75572.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/images/75572.png -------------------------------------------------------------------------------- /images/graph.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/images/graph.jpg -------------------------------------------------------------------------------- /images/graph3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/images/graph3.gif -------------------------------------------------------------------------------- /images/vRice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/images/vRice.jpg -------------------------------------------------------------------------------- /images/vCanvas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/images/vCanvas.jpg -------------------------------------------------------------------------------- /images/10GraphSMA.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/images/10GraphSMA.jpg -------------------------------------------------------------------------------- /images/vLegalPad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/images/vLegalPad.jpg -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "10" 4 | - "12" 5 | - "14" 6 | - "node" 7 | -------------------------------------------------------------------------------- /images/legal_pad_23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/images/legal_pad_23.jpg -------------------------------------------------------------------------------- /images/tn_graphpaper.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/images/tn_graphpaper.gif -------------------------------------------------------------------------------- /images/tn_notepaper.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/images/tn_notepaper.gif -------------------------------------------------------------------------------- /git-cheatsheet/images/vCanvas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/git-cheatsheet/images/vCanvas.jpg -------------------------------------------------------------------------------- /spec/helpers/dependencies.js: -------------------------------------------------------------------------------- 1 | global.navigator = { 2 | userAgent: 'test-chrome' 3 | } 4 | global.document = { cookie: '' } 5 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:20-alpine 2 | RUN corepack enable 3 | WORKDIR /app 4 | COPY . . 5 | RUN yarn install 6 | EXPOSE 8080 7 | CMD ["yarn", "start"] 8 | -------------------------------------------------------------------------------- /git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label-webfont.eot -------------------------------------------------------------------------------- /git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label-webfont.ttf -------------------------------------------------------------------------------- /git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label-webfont.woff -------------------------------------------------------------------------------- /git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label_reversed-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label_reversed-webfont.eot -------------------------------------------------------------------------------- /git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label_reversed-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label_reversed-webfont.ttf -------------------------------------------------------------------------------- /git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label_reversed-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndp/git-cheatsheet/HEAD/git-cheatsheet/fonts/Impact-Label-fontfacekit/Impact_label_reversed-webfont.woff -------------------------------------------------------------------------------- /spec/support/jasmine.json: -------------------------------------------------------------------------------- 1 | { 2 | "spec_dir": "spec", 3 | "spec_files": [ 4 | "**/*[sS]pec.js" 5 | ], 6 | "helpers": [ 7 | "helpers/**/*.js" 8 | ], 9 | "stopSpecOnExpectationFailure": false, 10 | "random": false 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | /git-cheatsheet/*.js 3 | /git-cheatsheet/*.map 4 | git-cheatsheet/styles.css 5 | git-cheatsheet/main.js.LICENSE.txt 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/sdks 12 | !.yarn/versions 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig 2 | # See: http://EditorConfig.org 3 | 4 | # top-most EditorConfig file 5 | root = true 6 | 7 | # Set default charset 8 | [*.{js,mjs,py,rb,erb}] 9 | charset = utf-8 10 | 11 | [*] 12 | end_of_line = lf 13 | indent_style = space 14 | indent_size = 2 15 | trim_trailing_whitespace = true 16 | insert_final_newline = true 17 | -------------------------------------------------------------------------------- /git-cheatsheet.htm: -------------------------------------------------------------------------------- 1 | 2 |
3 |x
20 | \r becomes ' + "$1" + '')
30 | .replace(/\r/g, 'Impact Label Regular - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
31 | 32 | 33 | 34 |Impact Label Reversed Regular - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
35 | 36 |', function() {
56 | expect(esc('foo `x=3` baz')).toEqual('foo x=3 baz')
57 | expect(esc('foo `x=3` baz `y=5`')).toEqual('foo x=3 baz y=5')
58 | })
59 | });
60 |
61 | describe('detectLanguage', function() {
62 | const navigator = {}
63 | it('looks at navigation', function() {
64 | navigator.language = 'fr-FR'
65 | expect(detectLanguage(navigator)).toEqual('fr')
66 | })
67 | it('cookie can override', function() {
68 | navigator.language = 'fr-FR'
69 | cookies.read = () => 'de'
70 | try {
71 | expect(detectLanguage(navigator)).toEqual('de')
72 | } finally {
73 | cookies.read = () => null
74 | }
75 | })
76 | it('works for IE', function() {
77 | navigator.language = undefined
78 | navigator.userLanguage = 'fr-FR'
79 | expect(detectLanguage(navigator)).toEqual('fr')
80 | })
81 | it('works with nil', function() {
82 | navigator.language = undefined
83 | navigator.userLanguage = undefined
84 | expect(detectLanguage(navigator)).toEqual('en')
85 | })
86 | })
87 |
88 | });
89 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Git Cheatsheet
2 |
3 |
4 |
5 |
6 |
7 | Standalone HTML page that organizes Git's commands by what they affect.
8 | Built as I was learning git and trying to understand it. It's proved useful
9 | to others in the same endeavor.
10 |
11 | ## Contributors
12 |
13 | * Development by Andrew Peterson,
[NDP Software](https://ndpsoftware.com)
14 | * French translation by [Bernard Opic](https://blogs.media-tips.com/bernard.opic/)
15 | * Simplified Chinese translation by [acecode](https://github.com/acecode)
16 | * Improve Simplified Chinese translation by
[rebornsick](https://github.com/rebornsick)
17 | * Traditional Chinese translation by
[Hsins](https://github.com/Hsins)
18 | * Bug fix by
[GerjanOnline](https://github.com/GerjanOnline)
19 | * Spanish translation by
[sminutoli](https://github.com/sminutoli)
20 | * Korean translation by
[ujuc](https://github.com/ujuc)
21 | * Italian translation by
[antoniopantaleo](https://github.com/antoniopantaleo)
22 | * Vietnamese translation by
[trgiangdo](https://github.com/trgiangdo)
23 | * Portuguese translation by
[HenriqueAJNB](https://github.com/HenriqueAJNB)
24 | * Russian translation by
[vistar](https://github.com/vistar)
25 |
26 | Comments and pull requests welcome.
27 |
28 | ## To add a translation
29 |
30 | 1. Determine the 2-letter language code (ISO 639-1). See the existing files in `git-cheatsheet/lang`.
31 | 2. Create a new JSON file with the name of the code in `git-cheatsheet/lang`. Choose one of the other languages as a starting point.
32 | 3. Write your translation. Use the exact identical property keys in the JSON structure. Only change the values.
33 | 4. Add a link for users to choose the translation. In `git-cheatsheet.html`, insert (alphabetically) a new line that looks like:
34 | ```
35 | vn
36 | ```
37 | 5. Add your name to the README.md above.
38 | 6. Test manually
39 | 7. Create a pull request. Give me a couple days to reply, but then feel free to write.
40 | 8. Once it's merged, tell people about it.
41 |
42 | Keep the PR restricted to changes related to the translation.
43 |
44 |
45 | ## Development
46 |
47 | Files are in the `src` folder. To see it locally:
48 | - `yarn install` to install dependencies
49 | - `yarn test` to run the tests
50 | - `yarn build` to transpile.
51 | - `yarn start` or `yarn start-docker` to serve. The latter uses a Docker container.
52 | - Open `http://127.0.0.1:8080/git-cheatsheet.html` to view the page
53 |
54 | CI is on [Github Actions](https://github.com/ndp/git-cheatsheet/actions).
55 |
56 | ## Deploy
57 |
58 | ### Legacy
59 | Use FTP to upload to [NDP Software](http://www.ndpsoftware.com/)
60 |
61 | Exceptions caught and logged on [Rollbar](https://rollbar.com/ndpsoftware/git-cheatsheet/) (private).
62 |
63 | ### AWS Deployment
64 |
65 | ```bash
66 | rsync --progress -e "ssh -i ~/.ssh/LightsailDefaultKey-us-west-2.pem" ./git-cheatsheet.htm bitnami@52.36.92.53:/home/bitnami/htdocs/
67 |
68 | rsync --progress -e "ssh -i ~/.ssh/LightsailDefaultKey-us-west-2.pem" ./git-cheatsheet.html bitnami@52.36.92.53:/home/bitnami/htdocs/
69 |
70 | rsync -avcz --progress -e "ssh -i ~/.ssh/LightsailDefaultKey-us-west-2.pem" ./git-cheatsheet bitnami@52.36.92.53:/home/bitnami/htdocs/
71 |
72 | rsync -avcz --progress -e "ssh -i ~/.ssh/LightsailDefaultKey-us-west-2.pem" ../agile_methods bitnami@52.36.92.53:/home/bitnami/htdocs/
73 |
74 |
75 | ```
76 |
77 | ## FAQ
78 |
79 | ### Are there any "features"?
80 |
81 | You can navigate over different "locations" and commands with the mouse, arrow keys, or vi-like keystrokes.
82 |
83 | ### Why is it called "Cheat Sheet"?
84 |
85 | It's pretty silly, actually. I had a little SEO juice from a couple other real cheat sheets,
86 | so I thought I'd just leverage that term. In retrospect, I think this was an
87 | okay tactic, as it brought people to the page.
88 |
89 | ## Like it or have ideas?
90 |
91 | If you like this and would like me to do more intereactions like this, send me an email... or [patreon.com/ndp](https://patreon.com/ndp)
92 |
93 | ## License
94 |
95 | Copyright (c) 2013-2024 Andrew J. Peterson, NDP Software
96 |
--------------------------------------------------------------------------------
/git-cheatsheet/lang/zh-cn.json:
--------------------------------------------------------------------------------
1 | {
2 | "commands": {
3 | "status": {
4 | "cmd": "status",
5 | "docs": "显示以下文件的状态变化和路径:\r• 暂存区与当前的 `HEAD` 指针提交之间的差异(即将提交),\r• 工作区与暂存区之间的差异(下次不会提交),\r• 没有被 git 追踪。"
6 | },
7 | "diff": {
8 | "cmd": "diff",
9 | "docs": "显示工作区与暂存区之间的差异。"
10 | },
11 | "diff x": {
12 | "cmd": "diff ",
13 | "docs": "查看工作区与某一提交之间的不同。你也可以使用 `HEAD` 指针来对比最新提交,或是使用分支名来和分支进行比较。"
14 | },
15 | "add x": {
16 | "cmd": "add ",
17 | "docs": "添加当前的新内容或是修改的文件到暂存区,作为下次提交的部分内容。使用 `add --interactive` 进行交互式操作将工作区中修改的内容添加到暂存区中。"
18 | },
19 | "add -u": {
20 | "cmd": "add -u",
21 | "docs": "添加当前修改(`不包括新文件`)到暂存区, 这与 'git commit -a' 准备提交内容的方式一致。"
22 | },
23 | "rm x": {
24 | "cmd": "rm ",
25 | "docs": "从工作区和暂存区删除某个文件。"
26 | },
27 | "mv x": {
28 | "cmd": "mv ",
29 | "docs": "从工作区和暂存区移动文件。"
30 | },
31 | "commit -a": {
32 | "cmd": "commit -a [-m 'msg']",
33 | "docs": "提交上次提交之后的所有修改,但未被追踪的文件除外(即所有已在暂存区中列出的文件),同时删除暂存区中已从工作区中删除的文件。"
34 | },
35 | "checkout x": {
36 | "cmd": "checkout ",
37 | "docs": "更新工作区文件或文件夹,`不会`切换分支。"
38 | },
39 | "reset head x": {
40 | "cmd": "reset HEAD ",
41 | "docs": "从下次提交中移除指定文件。重置暂存区记录但是不处理工作区(即文件修改被保留但不会被提交),同时报告没有被更新的文件。"
42 | },
43 | "reset --soft head^": {
44 | "cmd": "reset --soft HEAD^",
45 | "docs": "撤销上一次提交,以未提交的状态保留工作区的修改。完全不会修改暂存区文件或工作区,唯一的更改是移动本地仓库的指针。"
46 | },
47 | "reset --hard": {
48 | "cmd": "reset --hard",
49 | "docs": "恢复工作区和暂存区到上次提交的状态。警告:所有工作区修改都会丢失。如果你想从头开始的话,使用这条命令来解决合并错误。传入 `ORIG_HEAD` 来撤销该次提交以来的所有修改。"
50 | },
51 | "switch": {
52 | "cmd": "switch ",
53 | "docs": "切换分支,更改工作区和暂存区为 分支的内容,之后 `HEAD` 指向 分支。"
54 | },
55 | "checkout -b x": {
56 | "cmd": "checkout -b ",
57 | "docs": "新建一个分支并且立即切换过去。"
58 | },
59 | "merge x": {
60 | "cmd": "merge ",
61 | "docs": "从 分支合并到当前分支。\r使用 `‑‑no-commit` 可以保持在(已经合并)但未提交状态。\r使用 `--no-ff` 创建一个合并提交,即使合并被解析为快进。"
62 | },
63 | "rebase x": {
64 | "cmd": "rebase ",
65 | "docs": "回滚当前分支与 `` 分支分开处的所有提交记录,将这些提交一一应用到 `` 分支的 `HEAD` 作为新的提交记录。"
66 | },
67 | "cherry-pick x": {
68 | "cmd": "cherry-pick ",
69 | "docs": "整合选定提交的修改到当前分支。"
70 | },
71 | "revert x": {
72 | "cmd": "revert ",
73 | "docs": "回滚 指定的提交并提交结果。这需要当前工作区是干净的,即相比于 `HEAD` 提交没有修改。"
74 | },
75 | "diff --cached": {
76 | "cmd": "diff --cached []",
77 | "docs": "查看已经暂存的内容和上次提交的区别。可通过 指定某一提交。"
78 | },
79 | "commit": {
80 | "cmd": "commit [-m 'msg']",
81 | "docs": "暂存区中的当前内容连同提交信息储存为新提交。"
82 | },
83 | "commit --amend": {
84 | "cmd": "commit --amend",
85 | "docs": "用当前暂存区的内容修改上一次的提交,也可以拿来修改提交信息。"
86 | },
87 | "log": {
88 | "cmd": "log",
89 | "docs": "显示最近的提交,新的在上边。参数:\r`‑‑decorate` 显示分支和tag名字到对应的提交\r`‑‑stat` 显示状态 (文件修改, 添加, 删除) \r`‑‑author=` 只显示某个作者\r`‑‑after=\"MMM DD YYYY\"` 如(\"Jun 20 2008\") 只显示某个日期之后的提交\r`‑‑before=\"MMM DD YYYY\"` 只显示某个日期之前的提交\r`‑‑merge` 只与当前合并冲突有关的提交"
90 | },
91 | "diff x x": {
92 | "cmd": "diff ",
93 | "docs": "显示两个提交之间的不同。"
94 | },
95 | "branch": {
96 | "cmd": "branch",
97 | "docs": "显示所有(本地)存在的分支。参数 `-r` 显示远程追踪分支,参数 `-a` 显示全部。"
98 | },
99 | "branch -d x": {
100 | "cmd": "branch -d ",
101 | "docs": "删除某个分支,使用 `—D` 来强制删除。"
102 | },
103 | "branch --track x x": {
104 | "cmd": "branch --track ",
105 | "docs": "新建一个本地分支来跟踪一个远程分支。"
106 | },
107 | "clone x": {
108 | "cmd": "clone ",
109 | "docs": "下载 `` 指定的仓库,并在工作区检出主分支的 `HEAD` 记录。"
110 | },
111 | "pull x x": {
112 | "cmd": "pull ",
113 | "docs": "从远程仓库取得修改到当前分支. 一般来说, `git pull` 相当于 `git fetch` 然后再 `git merge FETCH_HEAD` 。"
114 | },
115 | "reset --hard x/x": {
116 | "cmd": "reset --hard /",
117 | "docs": "重置本地仓库和工作区,让它与远程仓库一致。用 `reset ‑‑hard origin/main` 来丢弃所有的本地修改,通常会使用这个命令来处理失败的合并,记录会直接从远程仓库开始。"
118 | },
119 | "fetch x x": {
120 | "cmd": "fetch ",
121 | "docs": "从远程仓库下载对象和引用(即版本信息)。"
122 | },
123 | "push": {
124 | "cmd": "push",
125 | "docs": "从本地提交推送分支改变到远程,分支为所有推送过的分支。"
126 | },
127 | "push x x": {
128 | "cmd": "push ",
129 | "docs": "向远程仓库推送新(或已存在的)的分支。"
130 | },
131 | "push x x:x": {
132 | "cmd": "push :",
133 | "docs": "以另外一个名字推送分支到远程仓库。 是本地分支名称, 是远程仓库中的分支名称。"
134 | },
135 | "branch -r": {
136 | "cmd": "branch -r",
137 | "docs": "列出远程分支。"
138 | },
139 | "push --delete": {
140 | "cmd": "push --delete ",
141 | "docs": "删除一个远程分支。"
142 | },
143 | "clean": {
144 | "cmd": "clean",
145 | "docs": "从当前文件夹开始递归清理不受版本管理的内容。使用 `-n` 显示将被删除的文件。使用 `-f` 删除文件。"
146 | },
147 | "stash push": {
148 | "cmd": "stash push []",
149 | "docs": "保存当前修改到新的贮藏区,并且执行 `git reset --hard` 回滚. 是可选项,用来描述贮藏状态。想快速创建一个快照,省略掉 `push` 和 。"
150 | },
151 | "stash apply": {
152 | "cmd": "stash apply []",
153 | "docs": "从指定贮藏中将修改应用到工作区,默认是最新的贮藏。"
154 | },
155 | "stash pop": {
156 | "cmd": "stash pop",
157 | "docs": "应用最新(或指定的)贮藏中的修改,然后删除贮藏。"
158 | },
159 | "stash list": {
160 | "cmd": "stash list",
161 | "docs": "显示当前你有的所有贮藏。"
162 | },
163 | "stash show": {
164 | "cmd": "stash show []",
165 | "docs": "显示贮藏中记录的修改,对比贮藏生成时的原来状态。不指定 则显示最新的贮藏。"
166 | },
167 | "stash drop": {
168 | "cmd": "stash drop []",
169 | "docs": "从贮藏区中删除单个贮藏;不指定 则删除最新的贮藏。"
170 | },
171 | "stash clear": {
172 | "cmd": "stash clear",
173 | "docs": "清空贮藏区。注意相关存档会被清理,此操作`不能被恢复`。"
174 | },
175 | "stash branch x": {
176 | "cmd": "stash branch []",
177 | "docs": "新建并检出一个新分支 , 分支开始于最初创建 的提交,应用贮藏的修改作为新的工作区和索引。\r如果命令执行成功,并且 是以 stash@{} 方式给出的,则删除这个 。未给出则使用最新的贮藏。\r如果运行 `git stash push` 的分支已更改到足以导致 `git stash apply` 因冲突而失败,那么这将非常有用。由于贮藏是在运行 `git stash` 时在 `HEAD` 的提交之上应用的,因此它可以恢复最初贮藏的状态,而不会发生冲突。"
178 | }
179 | },
180 | "locations": {
181 | "stash": "贮藏区",
182 | "workspace": "工作区",
183 | "index": "暂存区",
184 | "local_repo": "本地仓库",
185 | "remote_repo": "上游仓库",
186 | "docs": {
187 | "stash": "当你去修改别的东西的时候,隐藏(临时保存)当前的修改的地方",
188 | "workspace": "你本地检出的代码。也被叫做 `工作拷贝`、`工作树` 或 `检出`。它是你文件系统上的任何一个目录,它有一个与之相关的仓库(通常通过其中存在一个名为 `.git` 的子目录来表示)。工作区包括该目录中的所有文件和子目录。",
189 | "index": "用于提交文件修改的暂存区域。在你“提交”(或记录)文件前,你首先需要将它们添加到索引中。也叫做 “当前目录缓存”、“暂存区”、“缓存”或“暂存文件”。",
190 | "local_repo": "`.git` 文件夹保存仓库需要的全部信息——即 Git 仓库的骨架,典型的分支: `main`, `master`, `feature-x`, `bugfix-y`。本地仓库具有与任何其他 Git 仓库完全相同的特性和功能。",
191 | "remote_repo": "与其他开发人员共享和协作的代码仓库。托管于某些网络或远端,例如 Github。默认名称是 \"origin\"。典型的分支:`main`、`master`、`shared-feature-x`、`release-y`。也被叫做“远程仓库”或“远端”。"
192 | }
193 | }
194 | }
195 |
--------------------------------------------------------------------------------
/git-cheatsheet/lang/zh-tw.json:
--------------------------------------------------------------------------------
1 | {
2 | "commands": {
3 | "status": {
4 | "cmd": "status",
5 | "docs": "顯示狀態變化,包括了以下文件的路徑:\r• 暫存區與當前 `HEAD` 提交之間的差異(即將提交)\r• 工作區與暫存區之間的差異(下次不會提交)\r• 沒有被 Git 所追蹤(沒有歷史記錄)"
6 | },
7 | "diff": {
8 | "cmd": "diff",
9 | "docs": "顯示工作區中尚未添加到暫存區中檔案的不同,亦即對比執行 `git add` 命令之前的檔案"
10 | },
11 | "diff x": {
12 | "cmd": "diff ",
13 | "docs": "查看工作區與某一次提交(commit)之間的不同,你也可以指定 `HEAD` 來對比上一次的提交,或者是使用分支(branch)名稱來和分支進行比較"
14 | },
15 | "add x": {
16 | "cmd": "add ",
17 | "docs": "添加當前的更新內容或是修改的文件到暫存區,作為下次提交的部分內容。可以使用 `add --interactive` 進行互動式操作"
18 | },
19 | "add -u": {
20 | "cmd": "add -u",
21 | "docs": "添加當前修改(但不包含新的文件)到暫存區, 這與 `git commit -a` 準備提交內容的方式一致"
22 | },
23 | "rm x": {
24 | "cmd": "rm ",
25 | "docs": "從工作區和暫存區刪除檔案"
26 | },
27 | "mv x": {
28 | "cmd": "mv ",
29 | "docs": "從工作區和暫存區移動檔案"
30 | },
31 | "commit -a": {
32 | "cmd": "commit -a [-m 'msg']",
33 | "docs": "提交上次提交之後的所有修改,但未被追蹤的文件(亦即所有暫存區中有記錄的文件)除外,並且會從暫存區刪除已在工作區刪除的文件"
34 | },
35 | "checkout x": {
36 | "cmd": "checkout ",
37 | "docs": "更新工作區文件或目錄,這並不會切換分支(branch)"
38 | },
39 | "reset head x": {
40 | "cmd": "reset HEAD ",
41 | "docs": "刪除下一次提交中的指定文件,這會重置索引區記錄但是不會影響到工作樹(也就是說,改動的文件會被保留,但不會被提交),並列出沒有被更新的文件"
42 | },
43 | "reset --soft head^": {
44 | "cmd": "reset --soft HEAD^",
45 | "docs": "恢復上一次提交,保留暫存區的改動"
46 | },
47 | "reset --hard": {
48 | "cmd": "reset --hard",
49 | "docs": "恢復工作區和暫存區到上次提交的狀態。[警告] 所有工作區中所做的修改都會被丟棄,因此可以使用這條指令來解決合併衝突,會將狀態從新開始。傳入 `ORIG_HEAD` 可以用來撤銷該次提交以來的所有改動"
50 | },
51 | "switch": {
52 | "cmd": "switch ",
53 | "docs": "切換分支,更改工作區和暫存區為 `` 分支的內容,之後 `HEAD` 會指向 `` 分支"
54 | },
55 | "checkout -b x": {
56 | "cmd": "checkout -b ",
57 | "docs": "創建一個分支並且立即切換過去"
58 | },
59 | "merge x": {
60 | "cmd": "merge ",
61 | "docs": "從 `` 分支合併到當前分支。使用 `--no-commit` 可以在合併後保持為尚未提交的狀態;使用 `--no-ff` 可以創建一個合併的提交狀態,即使合併的分支內容是自己的直接後代(fast-forward)"
62 | },
63 | "rebase x": {
64 | "cmd": "rebase ",
65 | "docs": "回滾當前分支與 `` 分開處的所有提交紀錄,將這些提交紀錄一一應用到 `` 分支的 `HEAD` 作為新的提交紀錄"
66 | },
67 | "cherry-pick x": {
68 | "cmd": "cherry-pick ",
69 | "docs": "把某個提交移動到當前分支來"
70 | },
71 | "revert x": {
72 | "cmd": "revert ",
73 | "docs": "回滾 `` 指定的提交,這需要當前工作區是乾凈的,即相比於 `HEAD` 提交沒有修改"
74 | },
75 | "diff --cached": {
76 | "cmd": "diff --cached []",
77 | "docs": "查看已經暫存的內容和上次提交的區別,也可指定某一提交"
78 | },
79 | "commit": {
80 | "cmd": "commit [-m 'msg']",
81 | "docs": "暫存區中的當前內容連同提交信息儲存為新提交"
82 | },
83 | "commit --amend": {
84 | "cmd": "commit --amend",
85 | "docs": "用當前暫存區的內容修改最近一次的提交,也可以拿來修改提交訊息(commit messages)"
86 | },
87 | "log": {
88 | "cmd": "log",
89 | "docs": "顯示最近的提交紀錄,最新的紀錄會在上方。參數可以為:\r`--decorate` 顯示分支(branch)和標籤(tag)名稱到對應的提交紀錄\r`--stat` 顯示狀態(文件修改、添加或刪除)\r`--author=` 只顯示特定作者的提交紀錄\r`--after=\"MMM DD YYYY\"` 只顯示特定時間之後的提交紀錄,時間格式如 `\"Jun 20 2008\"`\r`--before=\"MMM DD YYYY\"` 只顯示特定時間之前的提交紀錄\r`--merge` 只顯示與當前合併衝突有關的提交紀錄"
90 | },
91 | "diff x x": {
92 | "cmd": "diff ",
93 | "docs": "顯示兩個提交之間的不同"
94 | },
95 | "branch": {
96 | "cmd": "branch",
97 | "docs": "顯示所有(本地)存在的分支。參數 `-r` 顯示遠端追蹤分支,參數 `-a` 顯示全部"
98 | },
99 | "branch -d x": {
100 | "cmd": "branch -d ",
101 | "docs": "刪除某個分支,使用 `—D` 來強制刪除"
102 | },
103 | "branch --track x x": {
104 | "cmd": "branch --track ",
105 | "docs": "添加一個本地分支來跟蹤某個遠端分支"
106 | },
107 | "clone x": {
108 | "cmd": "clone ",
109 | "docs": "下載 `` 指定的版本倉庫,並在工作區中檢出主要分支(通常為 `main` 或 `main` 分支)的 `HEAD` 紀錄"
110 | },
111 | "pull x x": {
112 | "cmd": "pull ",
113 | "docs": "從遠端版本倉庫取得修改到當前分支。一般來說, `git pull` 相當於 `git fetch` 然後做 `git merge FETCH_HEAD`"
114 | },
115 | "reset --hard x/x": {
116 | "cmd": "reset --hard /",
117 | "docs": "重置本地版本倉庫,讓它與遠端版本一致;可以使用 `reset --hard origin/main` 來丟棄所有的本地改動,通常會使用這個指令來處理失敗的合併,紀錄會直接從遠端倉庫開始"
118 | },
119 | "fetch x x": {
120 | "cmd": "fetch ",
121 | "docs": "從遠端版本倉庫下載對象和引用(亦即版本資訊)"
122 | },
123 | "push": {
124 | "cmd": "push",
125 | "docs": "從本地提交推送分支改變到遠端,分支為所有推送過的分支"
126 | },
127 | "push x x": {
128 | "cmd": "push ",
129 | "docs": "向遠端版本倉庫推送新的(已存在的)分支"
130 | },
131 | "push x x:x": {
132 | "cmd": "push :",
133 | "docs": "向遠端版本倉庫推送分支,但是從不同的(本地)分支名稱推送"
134 | },
135 | "branch -r": {
136 | "cmd": "branch -r",
137 | "docs": "顯示遠端倉庫分支"
138 | },
139 | "push --delete": {
140 | "cmd": "push --delete ",
141 | "docs": "刪除一個遠端分支,通過向遠端分支推送空內容"
142 | },
143 | "clean": {
144 | "cmd": "clean",
145 | "docs": "從當前目錄遞迴地清除沒有進行版本控制的內容"
146 | },
147 | "stash push": {
148 | "cmd": "stash push []",
149 | "docs": "將當前本地的修改保存到新的存檔中,並且執行 `git reset --hard` 回滾。其中 `` 是可選項,用來描述存檔的說明,如果想要快速創建存檔,可以同時省略掉 `push` 和 ``"
150 | },
151 | "stash apply": {
152 | "cmd": "stash apply []",
153 | "docs": "將指定存檔 `` 中的變動應用到工作區中,預設狀態是最近的存檔"
154 | },
155 | "stash pop": {
156 | "cmd": "stash pop",
157 | "docs": "應用上一次(或指定)的存檔變動,並將其從儲藏區中移除"
158 | },
159 | "stash list": {
160 | "cmd": "stash list",
161 | "docs": "顯示目前所有的儲存狀態紀錄"
162 | },
163 | "stash show": {
164 | "cmd": "stash show []",
165 | "docs": "顯示儲藏區中存檔的改動,對比存檔生成時的原始狀態,如果沒有指定 `` 則會顯示上一次添加存檔的變動情形"
166 | },
167 | "stash drop": {
168 | "cmd": "stash drop []",
169 | "docs": "從儲藏區中刪除單個狀態,如果沒有指定 `` 則會刪除上一次添加的存檔"
170 | },
171 | "stash clear": {
172 | "cmd": "stash clear",
173 | "docs": "清除儲藏區中的所有存檔。注意這個指令會清除相關存檔,並且此操作不能恢復"
174 | },
175 | "stash branch x": {
176 | "cmd": "stash branch []",
177 | "docs": "新建並檢出一個新的分支 ``,這個分支會以 `` 存檔建立時的來源進行提交,並將 `` 中所記錄的狀態應用到新的工作樹與索引上。如果指令執行成功,並且 `` 是參照到 `stash@{}` 存檔,則會將該存檔從暫存區中刪除。如果沒有指定 ``,則會使用最後一個存檔。這個指令在當前分支運行 `git stash push` 導致衝突時十分好用,因為存檔會被應用在 `git stash` 被執行時的 `HEAD` 上,並還原原始存檔狀態所以不會導致衝突"
178 | }
179 | },
180 | "locations": {
181 | "stash": "儲藏區(Stash)",
182 | "workspace": "工作區(Workspace)",
183 | "index": "暫存區(Index)",
184 | "local_repo": "本地倉庫(Local Repository)",
185 | "remote_repo": "遠端倉庫(Upstream Repository)",
186 | "docs": {
187 | "stash": "當你去修改其他東西時,用來隱藏(臨時保存)當前修改內容的地方",
188 | "workspace": "本地專案中存放原始檔案的資料夾,即本地檢出(Local checkout)",
189 | "index": "保存你所要提交(commit)的檔案。在提交檔案之前,你必須先將這些檔案添加到 Index 中,因此又稱為「當前目錄快取(current directory cache)」、「暫存區域(staging area)」、「快取(cache)」或「暫存檔案(staged files)」",
190 | "local_repo": "有一個名稱為 `.git` 的子目錄,用以保存版本倉庫所需要的全部資訊 —— 亦即 Git 倉庫的骨架。一般典型的分支(branch)會有:`main`, `feature-x`, `bugfix-y` 等",
191 | "remote_repo": "存放於區域網路或網際網路上,供其他開發者使用的版本倉庫,預設名稱為 `origin`。一般典型的分支(branch)會有:`main`, `feature-x`, `bugfix-y` 等"
192 | }
193 | }
194 | }
195 |
--------------------------------------------------------------------------------
/git-cheatsheet/lang/ko.json:
--------------------------------------------------------------------------------
1 | {
2 | "commands": {
3 | "status": {
4 | "cmd": "status",
5 | "docs": "표시: \r• 인덱스 파일과 현재 `HEAD` 커밋 사이에 차이가 있는 경로, \r• 작업 공간과 인덱스 카일간 차이가 나는 경로, \r• git에서 추적하지 않는 작업 영역에서의 경로."
6 | },
7 | "diff": {
8 | "cmd": "diff",
9 | "docs": "인덱스에 추가되지 않은 차이점을 보여줍니다."
10 | },
11 | "diff x": {
12 | "cmd": "diff ",
13 | "docs": "이름이 정해진 과 관련된 workplace의 변경 사항을 확인합니다. `HEAD`를 사용하여 최신 커밋과 비교하거나 branch 이름을 이용하여 다른 branch를 비교할 수 있습니다."
14 | },
15 | "add x": {
16 | "cmd": "add ",
17 | "docs": "새로운 파일 또는 수정된 파일에 대한 현재 내용을 인덱스에 추가하여 다음 커밋에 포함할 내용을 준비합니다. `add --interactive`를 이용하여 수정된 내용을 대화식으로 workplace에서 인덱스로 추가할 수 있습니다."
18 | },
19 | "add -u": {
20 | "cmd": "add -u",
21 | "docs": "수정된 (새롭게 만든게 아닌) 파일의 현재 내용을 인덱스에 추가합니다. 이는 `git commit -a`로 커밋을 준비하는 것과 비슷합니다."
22 | },
23 | "rm x": {
24 | "cmd": "rm ",
25 | "docs": "Workspace와 인덱스에서 파일을 삭제합니다."
26 | },
27 | "mv x": {
28 | "cmd": "mv ",
29 | "docs": "Workspace와 인덱스에서 파일을 옮깁니다."
30 | },
31 | "commit -a": {
32 | "cmd": "commit -a [-m 'msg']",
33 | "docs": "추적하지 않는 파일을 제외하고, 마지막 커밋 이후 인덱스에 나열된 모든 파일을 커밋합니다. 인덱스에서 삭제된 파일은 workspace에서 삭제됩니다."
34 | },
35 | "checkout x": {
36 | "cmd": "checkout ",
37 | "docs": "Workspace에 있는 파일과 디렉토리를 업데이트 합니다. 브런치를 바꾸지 말아야합니다."
38 | },
39 | "reset head x": {
40 | "cmd": "reset HEAD ",
41 | "docs": "다음 커밋에서 지정된 파일을 제거합니다. 인덱스를 재설정하지만, 작업 트리는 다시 설정 하지 않습니다. 변경된 파일은 보존되지만 커밋으로 표시되지 않습니다. 그리고 업데이트 하지 않은 내용을 보여줍니다."
42 | },
43 | "reset --soft head^": {
44 | "cmd": "reset --soft HEAD^",
45 | "docs": "마지막 커밋을 실행 취소하고, 인덱스에서 변경 내용을 남겨둡니다."
46 | },
47 | "reset --hard": {
48 | "cmd": "reset --hard",
49 | "docs": "Workplace와 인덱스를 로컬 트리와 일치시킵니다. 경고: 커밋 이후 작업 중인 트리에서 추적 중인 파일에 대한 변경 사항이 사라집니다. 병합으로 인해 충돌이 발생하여 처음부터 다시 시작하려는 경우에 사용합니다. `ORGI_HEAD`로 수정하게되면 가장 최근에 성공한 병합과 이후 변경 사항을 취소할 수 있습니다."
50 | },
51 | "switch": {
52 | "cmd": "switch ",
53 | "docs": "지정한 branch인 를 인덱스와 workspace를 반영하고, `HEAD`를 로 업데이트하여 branch를 변경합니다."
54 | },
55 | "checkout -b x": {
56 | "cmd": "checkout -b ",
57 | "docs": "Branch를 만들고 변경합니다."
58 | },
59 | "merge x": {
60 | "cmd": "merge ",
61 | "docs": "에서 변경한 내용을 현재 branch로 병합합니다.\r`‑‑no-commit`을 사용하여 커밋되지 않은 변경 내용을 남겨둘 수 있습니다. 만약 병합을 빠른 감기(fast forward)로 진행되더라도 `--no-ff` 를 사용하여 병합 커밋을 만듭니다."
62 | },
63 | "rebase x": {
64 | "cmd": "rebase ",
65 | "docs": "현재 branch가 에서 분기된 이후 모든 커밋을 되돌리고, `HEAD`에서 변경 내용을 하나씩 다시 적용합니다."
66 | },
67 | "cherry-pick x": {
68 | "cmd": "cherry-pick ",
69 | "docs": "선택한 커밋의 변경 내용을 현재 branch에 통합합니다."
70 | },
71 | "revert x": {
72 | "cmd": "revert ",
73 | "docs": "선택한 을 역방향 커밋을 실행하고 그 결과를 커밋합니다. 이렇게하려면 작업 트리를 정리해야합니다 (`HEAD` 커밋을 수정할 필요는 없습니다)."
74 | },
75 | "diff --cached": {
76 | "cmd": "diff --cached []",
77 | "docs": "작업 중인 변경 내용과 최신 커밋을 비교합니다. 을 추가하면 해당 커밋에서의 변경 내용을 확인할 수 있습니다."
78 | },
79 | "commit": {
80 | "cmd": "commit [-m 'msg']",
81 | "docs": "변경 내용을 설명하는 메시지와 인덱스에 있는 내용을 새로운 커밋에 저장합니다."
82 | },
83 | "commit --amend": {
84 | "cmd": "commit --amend",
85 | "docs": "현재 인덱스 변경으로 마지막 커밋을 수정합니다."
86 | },
87 | "log": {
88 | "cmd": "log",
89 | "docs": "최근 커밋을 보여줍니다. 가장 최근 커밋이 맨위에 있습니다. 옵션:\r`‑‑decorate` 커밋에 있는 branch와 태그 이름으로 보여줍니다.\r`‑‑stat` 로그 통계를 냅니다. (파일 변경, 추가, 삭제)\r`‑‑author=` 특정 사용자가 커밋한 내용으로 보여줍니다.\r`‑‑after=\"MMM DD YYYY\"` 예(`Jun 20 2008`) 특정 날짜 이전에 커밋된 커밋을 보여줍니다.\r`‑‑before=\"MMM DD YYYY\"` 특정 날짜 이후에 커밋된 커밋을 보여줍니다.\r`‑‑merge` 현재 병합 충돌에 관련된 커밋만 보여줍니다."
90 | },
91 | "diff x x": {
92 | "cmd": "diff ",
93 | "docs": "임의의 두 커밋간의 변경 내용을 확인합니다."
94 | },
95 | "branch": {
96 | "cmd": "branch",
97 | "docs": "모든 branch를 보여줍니다. `-r` 옵션은 원격 branch를 보여주고, `-a`는 원격, 로컬에 있는 branch를 보여줍니다."
98 | },
99 | "branch -d x": {
100 | "cmd": "branch -d ",
101 | "docs": "특정 branch를 삭제합니다. `-D`를 이용하여 강제로 삭제할 수 있습니다."
102 | },
103 | "branch --track x x": {
104 | "cmd": "branch --track ",
105 | "docs": "원격 branch를 따르는 새 로컬 branch를 만듭니다."
106 | },
107 | "clone x": {
108 | "cmd": "clone ",
109 | "docs": "로 지정된 저장소를 다운로드하고 main 브런치의 `HEAD`를 체크아웃 합니다."
110 | },
111 | "pull x x": {
112 | "cmd": "pull ",
113 | "docs": "원격 저장소의 변경 내용을 현재 branch에 반영합니다. 기본 모드에서 `git pull` 명령은 `git fetch`와 `git merge FETCH_HEAD`를 줄인 명령어입니다."
114 | },
115 | "reset --hard x/x": {
116 | "cmd": "reset --hard /",
117 | "docs": "로컬 저장소와 작업 트리를 리셋하여 원격 branch와 일치시킵니다. `reset ‑‑hard origin/main`를 사용하여 로컬 마스터 branch에서 모든 커밋을 버립니다. 이를 사용하여 실패한 병합을 다시 시작합니다."
118 | },
119 | "fetch x x": {
120 | "cmd": "fetch ",
121 | "docs": "다른 저장소에서 object와 refs를 다운받습니다."
122 | },
123 | "push": {
124 | "cmd": "push",
125 | "docs": "로컬 저장소와 원격 저장소 사이의 *공통적인* 모든 지점에서 커밋을 사용하여 원격 저장소로 업데이트합니다. 처음부터 원격 저장소에 업데이트되지 않은 로컬 branch는 공유되지 않습니다."
126 | },
127 | "push x x": {
128 | "cmd": "push ",
129 | "docs": "새로운 저장소 (또는 기존 저장소)를 원격 저장소로 업로드합니다."
130 | },
131 | "push x x:x": {
132 | "cmd": "push :",
133 | "docs": "다른 이름으로 새로운 저장소를 원격 저장소로 업로드합니다."
134 | },
135 | "branch -r": {
136 | "cmd": "branch -r",
137 | "docs": "원격 branch를 보여줍니다."
138 | },
139 | "push --delete": {
140 | "cmd": "push --delete ",
141 | "docs": "원격 브런치를 삭제합니다. 글자 그대로 \"이 지점에 아무것도 보내지마라.\" 입니다."
142 | },
143 | "clean": {
144 | "cmd": "clean",
145 | "docs": "현재 디렉토리에서 시작하여 버전 제어하고 있지 않은 파일을 재귀적으로 제거하여 작업 트리를 정리합니다. `-n`을 사용하여 \"dry run\" 형식으로 삭제될 내용을 확인할 수 있습니다. `-f`는 파일을 삭제합니다."
146 | },
147 | "stash push": {
148 | "cmd": "stash push []",
149 | "docs": "로컬 변경 내용을 새로운 stash 저장하고, `git reset ‑‑hard`를 실행하여 되돌립니다. 항목은 선택 사항이며, 숨기는 상태와 그에 대한 설명을 입력할 수 있습니다. 스냅 샷을 빠르게 작성하려면 `push`와 를 생략할 수 있습니다."
150 | },
151 | "stash apply": {
152 | "cmd": "stash apply []",
153 | "docs": "변경 내역을 stash 영역에서 workspace 영역으로 이동합니다. 최근에 저장한 stash 값이 기본 값입니다."
154 | },
155 | "stash pop": {
156 | "cmd": "stash pop",
157 | "docs": "마지막이나 지정된 stash 변경 내용을 적용한뒤 stash에서 해당 내용을 삭제합니다."
158 | },
159 | "stash list": {
160 | "cmd": "stash list",
161 | "docs": "현재 가지고 있는 stash 항목을 보여줍니다."
162 | },
163 | "stash show": {
164 | "cmd": "stash show []",
165 | "docs": "Stash에 기록된 변경 내용을 stash 상태와 원래 부모 커밋 사이의 차이점을 보여줍니다. 가 명시되지 않은 경우, 가장 최근의 stash 항목에대한 내용을 보여줍니다."
166 | },
167 | "stash drop": {
168 | "cmd": "stash drop []",
169 | "docs": "Stash 항목에서 하나의 stash 항목을 삭제합니다. 가 명시되지 않은 경우, 가장 최근의 stash 항목을 삭제합니다."
170 | },
171 | "stash clear": {
172 | "cmd": "stash clear",
173 | "docs": "Stash 항목을 모두 삭제합니다. 이럴경우, 가지 치기의 대상이되며, 복구가 불가능합니다."
174 | },
175 | "stash branch x": {
176 | "cmd": "stash branch []",
177 | "docs": "를 기존 작성된 커밋에서 시작하여 으로 brach를 생성하고 체크 아웃합니다. 에 기록된 변경 내용은 새 작업 트리와 색인에 적용됩니다. \r성공하면 는 stash@{} 형식의 참조하고 를 삭제합니다. 가 주어지지 않으면, 최근 저장된 stash 항목을 사용합니다. \r이것은 `git stash push`를 실행한 브런치가 변경되어 `git stash apply`시 충돌이 날때 유용합니다. stash는 `git stash`가 실행될 때, `HEAD`였던 커밋의 맨 위에 적용되기 때문에 충돌없이 기존 stash 상태로 복원합니다."
178 | }
179 | },
180 | "locations": {
181 | "stash": "stash",
182 | "workspace": "workspace",
183 | "index": "index",
184 | "local_repo": "local repository",
185 | "remote_repo": "upstream repository",
186 | "docs": {
187 | "stash": "다른 작업을하는 동안 수정 사항을 숨겨둘 수 있는 장소",
188 | "workspace": "로컬 체크 아웃",
189 | "index": "커밋하기를 원하는 파일. 파일을 \"commit\"(checkin) 하기 전에 먼저 Index에 추가하여야 합니다. \"현재 디렉토리 캐시\", \"스테이징 영역\", \"캐시\", 스태이지 파일\" 으로 불리웁니다.",
190 | "local_repo": "필요한 저장소 파일들을 모두 포함하고 있는 `.git`이라는 서브 디렉토리 (Git 저장소 뼈대를 말한다). 일반적인 브런치: `main`, `feature-x`, `bugfix-y`",
191 | "remote_repo": "인터넷이나 네트워크로 호스팅되는 프로젝트 버전으로, 모든 변경 사항을 다른 개발자들과 공유하여 사용할 수 있습니다. 기본 이름은 `origin`. 일반적인 브런치: `main`, `shared-feature-x`, `release-y`"
192 | }
193 | }
194 | }
195 |
--------------------------------------------------------------------------------
/src/commands.mjs:
--------------------------------------------------------------------------------
1 | export const locations = ["stash", "workspace", "index", "local_repo", "remote_repo"]
2 |
3 | export const commands = [
4 | {
5 | "left": "workspace",
6 | "right": "index",
7 | "direction": "status",
8 | "key": "status",
9 | "tags": "Basic Snapshotting",
10 | },
11 | {
12 | "left": "workspace",
13 | "right": "index",
14 | "direction": "status",
15 | "key": "diff",
16 | "tags": "Basic Snapshotting,Inspection and Comparison,Patching",
17 | },
18 | {
19 | "left": "workspace",
20 | "right": "local_repo",
21 | "direction": "status",
22 | "key": "diff x",
23 | "tags": "Basic Snapshotting,Inspection and Comparison,Patching",
24 | },
25 | {
26 | "left": "workspace",
27 | "right": "index",
28 | "direction": "up",
29 | "key": "add x",
30 | "tags": "Basic Snapshotting",
31 | },
32 | {
33 | "left": "workspace",
34 | "right": "index",
35 | "direction": "up",
36 | "key": "add -u",
37 | "tags": "Basic Snapshotting",
38 | },
39 | {
40 | "left": "workspace",
41 | "right": "index",
42 | "direction": "up",
43 | "key": "rm x",
44 | "tags": "Basic Snapshotting",
45 | },
46 | {
47 | "left": "workspace",
48 | "right": "index",
49 | "direction": "up",
50 | "key": "mv x",
51 | "tags": "Basic Snapshotting",
52 | },
53 | {
54 | "left": "workspace",
55 | "right": "local_repo",
56 | "direction": "up",
57 | "key": "commit -a",
58 | "tags": "Basic Snapshotting",
59 | },
60 | {
61 | "left": "workspace",
62 | "right": "index",
63 | "direction": "dn",
64 | "key": "checkout x",
65 | "tags": "Branching and Merging",
66 | },
67 | {
68 | "left": "index",
69 | "right": "index",
70 | "direction": "status",
71 | "key": "reset head x",
72 | "tags": "Basic Snapshotting",
73 | },
74 | {
75 | "left": "local_repo",
76 | "right": "local_repo",
77 | "direction": "status",
78 | "key": "reset --soft head^",
79 | "tags": "Basic Snapshotting",
80 | },
81 | {
82 | "left": "workspace",
83 | "right": "local_repo",
84 | "direction": "dn",
85 | "key": "reset --hard",
86 | "tags": "Basic Snapshotting",
87 | },
88 | {
89 | "left": "workspace",
90 | "right": "local_repo",
91 | "direction": "dn",
92 | "key": "reset --hard x/x",
93 | "tags": "Basic Snapshotting",
94 | },
95 | {
96 | "left": "workspace",
97 | "right": "local_repo",
98 | "direction": "dn",
99 | "key": "switch",
100 | "tags": "Branching and Merging",
101 | },
102 | {
103 | "left": "workspace",
104 | "right": "local_repo",
105 | "direction": "dn",
106 | "key": "checkout -b x",
107 | "tags": "Branching and Merging",
108 | },
109 | {
110 | "left": "workspace",
111 | "right": "local_repo",
112 | "direction": "dn",
113 | "key": "merge x",
114 | "tags": "Branching and Merging",
115 | },
116 | {
117 | "left": "workspace",
118 | "right": "local_repo",
119 | "direction": "dn",
120 | "key": "rebase x",
121 | "tags": "Patching",
122 | },
123 | {
124 | "left": "workspace",
125 | "right": "local_repo",
126 | "direction": "dn",
127 | "key": "cherry-pick x",
128 | "tags": "Patching",
129 | },
130 | {
131 | "left": "workspace",
132 | "right": "local_repo",
133 | "direction": "dn",
134 | "key": "revert x",
135 | },
136 | {
137 | "left": "index",
138 | "right": "local_repo",
139 | "direction": "status",
140 | "key": "diff --cached",
141 | "tags": "Basic Snapshotting,Inspection and Comparison,Patching",
142 | },
143 | {
144 | "left": "index",
145 | "right": "local_repo",
146 | "direction": "up",
147 | "key": "commit",
148 | "tags": "Basic Snapshotting",
149 | },
150 | {
151 | "left": "index",
152 | "right": "local_repo",
153 | "direction": "up",
154 | "key": "commit --amend",
155 | "tags": "Basic Snapshotting",
156 | },
157 | {
158 | "left": "local_repo",
159 | "right": "local_repo",
160 | "direction": "status",
161 | "key": "log",
162 | "tags": "Branching and Merging, Inspection and Comparison",
163 | },
164 | {
165 | "left": "local_repo",
166 | "right": "local_repo",
167 | "direction": "status",
168 | "key": "diff x x",
169 | "tags": "Basic Snapshotting, Inspection and Comparison,Patching",
170 | },
171 | {
172 | "left": "local_repo",
173 | "right": "local_repo",
174 | "direction": "status",
175 | "key": "branch",
176 | "tags": "Branching and Merging",
177 | },
178 | {"left": "remote_repo",
179 | "right": "remote_repo",
180 | "direction": "status",
181 | "key": "branch -r",
182 | "tags": "Branching and Merging"},
183 | {
184 | "left": "local_repo",
185 | "right": "local_repo",
186 | "direction": "status",
187 | "key": "branch -d x",
188 | "tags": "Branching and Merging",
189 | },
190 | {
191 | "left": "local_repo",
192 | "right": "remote_repo",
193 | "direction": "dn",
194 | "key": "branch --track x x",
195 | "tags": "Branching and Merging",
196 | },
197 | {
198 | "left": "workspace",
199 | "right": "remote_repo",
200 | "direction": "dn",
201 | "key": "clone x",
202 | "tags": "Creating Projects",
203 | },
204 | {
205 | "left": "workspace",
206 | "right": "remote_repo",
207 | "direction": "dn",
208 | "key": "pull x x",
209 | "tags": "Sharing and Updating",
210 | },
211 | {
212 | "left": "local_repo",
213 | "right": "remote_repo",
214 | "direction": "dn",
215 | "key": "fetch x x",
216 | "tags": "Sharing and Updating",
217 | },
218 | {
219 | "left": "local_repo",
220 | "right": "remote_repo",
221 | "direction": "up",
222 | "key": "push",
223 | "tags": "Sharing and Updating",
224 | },
225 | {
226 | "left": "local_repo",
227 | "right": "remote_repo",
228 | "direction": "up",
229 | "key": "push x x",
230 | "tags": "Sharing and Updating",
231 | },
232 | {
233 | "left": "local_repo",
234 | "right": "remote_repo",
235 | "direction": "up",
236 | "key": "push x x:x",
237 | "tags": "Sharing and Updating",
238 | },
239 | {
240 | "left": "remote_repo",
241 | "right": "remote_repo",
242 | "direction": "status",
243 | "key": "push --delete",
244 | "tags": "Sharing and Updating",
245 | },
246 | {
247 | "left": "workspace",
248 | "right": "workspace",
249 | "direction": "dn",
250 | "key": "clean",
251 | "tags": "Administration",
252 | },
253 | {
254 | "left": "stash",
255 | "right": "workspace",
256 | "direction": "dn",
257 | "key": "stash push",
258 | "tags": "Branching and Merging",
259 | },
260 | {
261 | "left": "stash",
262 | "right": "workspace",
263 | "direction": "up",
264 | "key": "stash pop",
265 | "tags": "Branching and Merging",
266 | },
267 | {
268 | "left": "stash",
269 | "right": "workspace",
270 | "direction": "up",
271 | "key": "stash apply",
272 | "tags": "Branching and Merging",
273 | },
274 | {
275 | "left": "stash",
276 | "right": "stash",
277 | "direction": "status",
278 | "key": "stash list",
279 | "tags": "Branching and Merging",
280 | },
281 | {
282 | "left": "stash",
283 | "right": "stash",
284 | "direction": "status",
285 | "key": "stash show",
286 | "tags": "Branching and Merging",
287 | },
288 | {
289 | "left": "stash",
290 | "right": "stash",
291 | "direction": "status",
292 | "key": "stash drop",
293 | "tags": "Branching and Merging",
294 | },
295 | {
296 | "left": "stash",
297 | "right": "stash",
298 | "direction": "status",
299 | "key": "stash clear",
300 | "tags": "Branching and Merging",
301 | },
302 | {
303 | "left": "stash",
304 | "right": "local_repo",
305 | "direction": "up",
306 | "key": "stash branch x",
307 | "tags": "Branching and Merging",
308 | },
309 | ]
310 |
--------------------------------------------------------------------------------
/git-cheatsheet/lang/es.json:
--------------------------------------------------------------------------------
1 | {
2 | "locations": {
3 | "stash": "stash",
4 | "workspace": "workspace",
5 | "index": "index",
6 | "local_repo": "repositorio local",
7 | "remote_repo": "repositorio remoto",
8 | "docs": {
9 | "stash": "Un lugar para ocultar cambios mientras trabajas en otra cosa",
10 | "workspace": "Espacio de trabajo: archivos locales posicionados en una rama",
11 | "index": "El index (o \"staging area\") contiene una captura del contenido del árbol de trabajo. Esta captura representa a los contenidos del próximo commit.",
12 | "local_repo": "Un subdirectorio llamado .git que contiene todos los archivos necesarios — un esqueleto del repositorio Git. Ramas típicas: `main`, `feature-x`, `bugfix-y`",
13 | "remote_repo": "Version(es) del proyecto que están alojadas en Internet o una red, asegurando que todos los cambios están disponibles para otros desarrolladores. Por defecto es \"origin\". Ramas típicas aquí son: `main`, `shared-feature-x`, `release-y`"
14 | }
15 | },
16 | "commands": {
17 | "status": {
18 | "cmd": "status",
19 | "docs": "Muestra las localizaciones que tienen diferencias entre el index y el commit `HEAD` actual, localizaciones que tienen diferencias entre el workspace y el index, y localizaciones en el workspace que no están siendo registradas por git"
20 | },
21 | "diff": {
22 | "cmd": "diff",
23 | "docs": "Muestra las diferencias no añadidas al index."
24 | },
25 | "diff x": {
26 | "cmd": "diff ",
27 | "docs": "Muestra los cambios que existen en el workspace relativos al mencionado. Puede usarse `HEAD` para comparar contra el último commit, o el nombre de una rama (branch) para comparar contra otra rama"
28 | },
29 | "add x": {
30 | "cmd": "add ",
31 | "docs": "Añade el contenido actual de archivos nuevos o modificados al index, preparando a la vez ese contenido para ser incluído en el próximo commit. Usar `add --interactive` para añadir los contenidos del espacio de trabajo al index de manera interactiva."
32 | },
33 | "add -u": {
34 | "cmd": "add -u",
35 | "docs": "Añade el contenido actual de los archivos modificados (NO NUEVOS) al index. Es similar a lo que hace 'git commit -a' al prepararse para realizar un commit."
36 | },
37 | "rm x": {
38 | "cmd": "rm ",
39 | "docs": "Elimina uno o varios archivos del espacio de trabajo e index."
40 | },
41 | "mv x": {
42 | "cmd": "mv ",
43 | "docs": "Mueve uno o varios archivos del espacio de trabajo e index."
44 | },
45 | "commit -a": {
46 | "cmd": "commit -a [-m 'msg']",
47 | "docs": "Realiza un commit con todos los cambios en los archivos desde el último commit, excluyendo los archivos no registrados (ej: todos los archivos que están listados en index). Elimina archivos en index que fueron eliminados del espacio de trabajo."
48 | },
49 | "checkout x": {
50 | "cmd": "checkout ",
51 | "docs": "Actualiza el archivo o directorio en el espacio de trabajo. Esto NO cambia de rama."
52 | },
53 | "reset head x": {
54 | "cmd": "reset HEAD ",
55 | "docs": "Descarta los archivos especificados del próximo commit. Restablece el index pero no el árbol de trabajo (ej:, los cambios en archivos se mantienen pero no se preparan para commit) y reporta cuales no han sido actualizados."
56 | },
57 | "reset --soft head^": {
58 | "cmd": "reset --soft HEAD^",
59 | "docs": "Deshace el último commit, dejando los cambio en el index."
60 | },
61 | "reset --hard": {
62 | "cmd": "reset --hard",
63 | "docs": "Equipara el espacio de trabajo y el index al árbol local. ADVERTENCIA: Se pierden todos los cambios a archivos registrados por git desde el último commit. Usar este comando si una combinación/merge resultó en conflictos y es necesario comenzar de nuevo. Al pasar `ORIG_HEAD` puede deshacerse el merge más reciente y todos los cambios posteriores."
64 | },
65 | "switch": {
66 | "cmd": "switch ",
67 | "docs": "Cambia de rama actualizando el index y el espacio de trabajo para reflejar la rama especificada, , y actualizando la posición de `HEAD` a ."
68 | },
69 | "checkout -b x": {
70 | "cmd": "checkout -b ",
71 | "docs": "Crea una rama y posiciona el `HEAD` allí"
72 | },
73 | "merge x": {
74 | "cmd": "merge ",
75 | "docs": "Combina (merge) los cambios de con los de la rama actual.\rUsar `‑‑no-commit` para dejar los cambios sin realizar un commit."
76 | },
77 | "rebase x": {
78 | "cmd": "rebase ",
79 | "docs": "Revierte todos los commits desde que la rama actual se separó del , y luego los vuelve a aplicar uno por uno por sobre los commits del `HEAD` de ."
80 | },
81 | "cherry-pick x": {
82 | "cmd": "cherry-pick ",
83 | "docs": "Aplica los cambios del commit especificado en la rama actual."
84 | },
85 | "revert x": {
86 | "cmd": "revert ",
87 | "docs": "Revierte el especificado y realiza un commit con el resultado. Esto requiere que el árbol de trabajo esté limpio (sin modificaciones desde el `HEAD` commit)"
88 | },
89 | "diff --cached": {
90 | "cmd": "diff --cached []",
91 | "docs": "Visualiza los cambios que se han preparado vs el último commit. Se puede pasar un para ver los cambios relativos al mismo."
92 | },
93 | "commit": {
94 | "cmd": "commit [-m 'msg']",
95 | "docs": "Almacena el contenido actual del index en un nuevo commit acompañado de un mensaje de log que describe esos cambios."
96 | },
97 | "commit --amend": {
98 | "cmd": "commit --amend",
99 | "docs": "Modifica el último commit con los cambios actuales en el index."
100 | },
101 | "log": {
102 | "cmd": "log",
103 | "docs": "Muestra los commits recientes, comenzando por los últimos. Optiones:\r`‑‑decorate` para incluir nombres de ramas y tags\r`‑‑stat` para incluir métricas (archivos modificados, insertados, and eliminados) \r`‑‑author=` para filtrar por autor\r`‑‑after=\"MMM DD YYYY\"` ej. (\"Jun 20 2008\") para incluir commits desde esa fecha\r`‑‑before=\"MMM DD YYYY\"` incluye commits anteriores a esa fecha \r`‑‑merge` incluye únicamente los commits involucrados en conflictos de combinación"
104 | },
105 | "diff x x": {
106 | "cmd": "diff ",
107 | "docs": "Visualizar los cambios entre dos commits arbitrariamente"
108 | },
109 | "branch": {
110 | "cmd": "branch",
111 | "docs": "Lista todas las ramas existentes. Agregando -r lista las ramas registradas como remotas, la opción -a muestra ambas ramas."
112 | },
113 | "branch -d x": {
114 | "cmd": "branch -d ",
115 | "docs": "Elimina la rama especificada. Usar -D para forzar esto."
116 | },
117 | "branch --track x x": {
118 | "cmd": "branch --track ",
119 | "docs": "Crea una nueva rama local que sigue a una rama remota."
120 | },
121 | "clone x": {
122 | "cmd": "clone ",
123 | "docs": "Descarga el repositorio especificado por y posiciona el `HEAD` en la rama main."
124 | },
125 | "pull x x": {
126 | "cmd": "pull ",
127 | "docs": "Incorpora los cambios desde un repositorio remoto en la rama actual. En su modo por defecto, `git pull` es un atajo de `git fetch` seguido por `git merge FETCH_HEAD`."
128 | },
129 | "reset --hard x/x": {
130 | "cmd": "reset --hard /",
131 | "docs": "Equipara el espacio de trabajo y el index con una rama remota. Usar `reset ‑‑hard origin/main` para descartar todos los commits en la rama local main. Se puede utilizar para comenzar de nuevo desde una combinación/merge fallida."
132 | },
133 | "fetch x x": {
134 | "cmd": "fetch ",
135 | "docs": "Descarga los objetos y referencias desde otro repositorio."
136 | },
137 | "push": {
138 | "cmd": "push",
139 | "docs": "Actualiza el servidor con los commits de todas ramas que tienen en *COMÚN* entre el repositorio local y el remoto. Las ramas locales que nunca fueron enviadas al server (push) no están compartidas."
140 | },
141 | "push x x": {
142 | "cmd": "push ",
143 | "docs": "Envía una nueva (o existente) rama al repositorio remoto"
144 | },
145 | "push x x:x": {
146 | "cmd": "push :",
147 | "docs": "Envía una rama al repositorio remoto con otro nombre"
148 | },
149 | "branch -r": {
150 | "cmd": "branch -r",
151 | "docs": "Lista las ramas remotas"
152 | },
153 | "push --delete": {
154 | "cmd": "push --delete ",
155 | "docs": "Elimina una rama remota."
156 | },
157 | "clean": {
158 | "cmd": "clean",
159 | "docs": "Limpia el árbol de trabajo eliminando de forma recursiva los archivos que no están bajo el control de versionado, comenzando por el directorio actual"
160 | },
161 | "stash push": {
162 | "cmd": "stash push []",
163 | "docs": "Guarda las modificaciones locales en un nuevo stash, y luego ejecuta git reset ‑‑hard para revertirlas. El es optativo y agrega una descripción adicional al estado. Para realizar una captura rápida, se pueden omitir tanto \"push\" como ."
164 | },
165 | "stash apply": {
166 | "cmd": "stash apply []",
167 | "docs": "Aplica los cambios del stash especificado en el espacio de trabajo. Por defecto aplica el último stash."
168 | },
169 | "stash pop": {
170 | "cmd": "stash pop",
171 | "docs": "Aplica los cambios del stash especificado y luego lo elimina de los temporales. Por defecto aplica el último stash."
172 | },
173 | "stash list": {
174 | "cmd": "stash list",
175 | "docs": "Lista los stashes disponibles actualmente."
176 | },
177 | "stash show": {
178 | "cmd": "stash show []",
179 | "docs": "Muestra los cambios almacenados en el stash aplicando un diff entre ese stash y su padre original. Por defecto utiliza el último stash."
180 | },
181 | "stash drop": {
182 | "cmd": "stash drop []",
183 | "docs": "Elimina una entrada del listado de stash. Por defecto elimina el último stash."
184 | },
185 | "stash clear": {
186 | "cmd": "stash clear",
187 | "docs": "Elimina todos las entradas del stash. IMPORTANTE: estas entradas eliminadas pueden ser irrecuperables luego."
188 | },
189 | "stash branch x": {
190 | "cmd": "stash branch []",
191 | "docs": "Crea y posiciona `HEAD` en el apuntando al commit del cual el fue creado originalmente, aplicando luego los cambios almacenados en el al nuevo árbol de trabajo. \rSi se realiza exitosamente, y es una referencia tipo stash@{}, el comando elimina el . Cuando no se especifica un , aplica el último. \rEste comando es útil en los casos en que la rama en la que se ejecutó git stash push ha cambiado demasiado por lo que git stash apply fallaría por conflictos. Al aplicar los cambios sobre el commit que fue `HEAD` al momento de ejecutar git stash originalmente, se restauran los cambios sin conflictos."
192 | }
193 | }
194 | }
195 |
--------------------------------------------------------------------------------
/git-cheatsheet/lang/de.json:
--------------------------------------------------------------------------------
1 | {
2 | "commands": {
3 | "status": {
4 | "cmd": "status",
5 | "docs": "Zeigt: \r• Pfade mit Unterschieden zwischen dem Index und dem aktuellen `HEAD` commit \r• Pfade mit Unterschieden zwischen der Arbeitskopie und dem Index \r• Pfade in der Arbeitskopie, die nicht durch Git verwaltet werden"
6 | },
7 | "diff": {
8 | "cmd": "diff",
9 | "docs": "Zeigt die Änderungen, die noch nicht dem Index hinzugefügt wurden."
10 | },
11 | "diff x": {
12 | "cmd": "diff ",
13 | "docs": "Zeigt die Änderungen in der Arbeitskopie im Vergleich zu dem . `HEAD` kann als synonym für den letzten Commit im aktuellen Branch verwendet werden. Wird ein Branch-Name angegeben, wird mit dem letzten Commit auf diesem Branch verglichen"
14 | },
15 | "add x": {
16 | "cmd": "add ",
17 | "docs": "Fügt neue oder geänderte Dateien oder Verzeichnisse dem Index hinzu."
18 | },
19 | "add -u": {
20 | "cmd": "add -u",
21 | "docs": "Fügt geänderte (NICHT NEUE) Dateien dem Index hinzu. Das ist ähnlich dem, was ein `git commit -a` vor dem Commit macht."
22 | },
23 | "rm x": {
24 | "cmd": "rm ",
25 | "docs": "Entfernt eine Datei aus der Arbeitskopie und dem Index."
26 | },
27 | "mv x": {
28 | "cmd": "mv ",
29 | "docs": "Verschiebt eine Datei in der Arbeitskopie und dem Index."
30 | },
31 | "commit -a": {
32 | "cmd": "commit -a [-m 'Nachricht']",
33 | "docs": "Fügt automatisch alle geänderten und gelöschte Dateien dem Index hinzu und committet diese dann. Neue Dateien bleiben unberücksichtigt."
34 | },
35 | "checkout x": {
36 | "cmd": "checkout ",
37 | "docs": "Aktualisiert die Datei oder das Verzeichnis in der Arbeitskopie vom lokalen Repository. Arbeitet auf dem aktuellen Branch."
38 | },
39 | "reset head x": {
40 | "cmd": "reset HEAD ",
41 | "docs": "Entfernt die aus dem Index, in der Arbeitskopie bleibt die Änderung erhalten."
42 | },
43 | "reset --soft head^": {
44 | "cmd": "reset --soft HEAD^",
45 | "docs": "Setzt die Arbeitskopie auf den Stand des letzten Commits im lokalen Repository zurück. Der Inhalt im Index bleibt erhalten."
46 | },
47 | "reset --hard": {
48 | "cmd": "reset --hard",
49 | "docs": "Setzt die Arbeitskopie auf den Stand des letzten Commits im lokalen Repository zurück. WARNUNG: Alle nicht committeten Änderungen und neue Dateien der Arbeitskopie und des Index gehen verloren. Dieses Kommando ist nützlich, wenn ein Merge fehlgeschlagen ist und man von vorne beginnen möchte. Mit dem Parameter `ORIG_HEAD` kann der letzte, erfolgreiche Merge und alle Änderungen danach rückgängig gemacht werden."
50 | },
51 | "switch": {
52 | "cmd": "switch ",
53 | "docs": "Checkt den in die Arbeitskopie aus. Änderungen bleiben erhalten, so dass sie in den Branch committet werden können."
54 | },
55 | "checkout -b x": {
56 | "cmd": "checkout -b ",
57 | "docs": "Erzeugt einen neuen Branch und wechselt zu diesem"
58 | },
59 | "merge x": {
60 | "cmd": "merge ",
61 | "docs": "Mergt Änderungen aus oder in den aktuellen Branch.\rMit `‑‑no-commit` wird kein automatisches Commit durchgeführt. Mit `--no-ff` wird auch dann ein Merge-Commit erzeugt, wenn ein Fast-Forward Merge gemacht werden könnte."
62 | },
63 | "rebase x": {
64 | "cmd": "rebase ",
65 | "docs": "Alle lokalen Commits werden in einen temporären Bereich verschoben und nacheinander auf den HEAD vom wieder aufgespielt. Wird genutzt, um eigene Änderungen mit dem letzten Stand des Remote Repositories ohne einen Merge Commit zusammenzuführen."
66 | },
67 | "cherry-pick x": {
68 | "cmd": "cherry-pick