Merge pull request #2 from pcottle/master

fetch upstream
This commit is contained in:
vinothmdev 2021-01-12 21:44:52 -05:00 committed by GitHub
commit 635dc8594c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 240 additions and 46 deletions

View file

@ -164,7 +164,7 @@ var gitDeployMergeMaster = function(done) {
var gitDeployPushOrigin = function(done) {
execSync('git commit -am "rebuild for prod"; ' +
'git push origin gh-pages && ' +
'git push origin gh-pages --force && ' +
'git branch -f trunk gh-pages && ' +
'git checkout master'
);

View file

@ -20,6 +20,12 @@ var GlobalStateActions = {
});
},
disableLevelInstructions: function() {
AppDispatcher.handleViewAction({
type: ActionTypes.DISABLE_LEVEL_INSTRUCTIONS,
});
},
changeFlipTreeY: function(flipTreeY) {
AppDispatcher.handleViewAction({
type: ActionTypes.CHANGE_FLIP_TREE_Y,

View file

@ -26,6 +26,7 @@ module.exports = {
SUBMIT_COMMAND: null,
CHANGE_LOCALE: null,
CHANGE_LOCALE_FROM_HEADER: null,
DISABLE_LEVEL_INSTRUCTIONS: null,
/**
* only dispatched when you actually
* solve the level, not ask for solution

View file

@ -35,7 +35,7 @@ exports.dialog = {
markdowns: [
'## ¡Bienvenid@ a Learn Git Branching!',
'',
'Esta aplicación está diseñada para ayudar a los principantes ',
'Esta aplicación está diseñada para ayudar a los principiantes ',
'a manejar los poderosos conceptos que hay detrás del trabajo ',
'con ramas (branches) en Git. Esperamos que disfrutes la aplicación ',
'y tal vez incluso ¡que aprendas algo! ',
@ -91,7 +91,7 @@ exports.dialog = {
markdowns: [
'## ¡Bienvenid@ a Learn Git Branching!',
'',
'Esta aplicación está diseñada para ayudar a los principantes',
'Esta aplicación está diseñada para ayudar a los principiantes',
'a manejar los poderosos conceptos que hay detrás del trabajo',
'con ramas (branches) en Git. Esperamos que disfrutes la aplicación',
'y tal vez incluso ¡que aprendas algo!',
@ -147,7 +147,7 @@ exports.dialog = {
markdowns: [
'## ¡Bienvenid@ a Learn Git Branching!',
'',
'Esta aplicación está diseñada para ayudar a los principantes ',
'Esta aplicación está diseñada para ayudar a los principiantes ',
'a manejar los poderosos conceptos que hay detrás del trabajo ',
'con ramas (branches) en Git. Esperamos que disfrutes la aplicación ',
'y tal vez incluso ¡que aprendas algo! ',

View file

@ -480,9 +480,9 @@ GitEngine.prototype.setLocalToTrackRemote = function(localBranch, remoteBranch)
}
var msg = 'local branch "' +
localBranch.get('id') +
this.postProcessBranchID(localBranch.get('id')) +
'" set to track remote branch "' +
remoteBranch.get('id') +
this.postProcessBranchID(remoteBranch.get('id')) +
'"';
this.command.addWarning(intl.todo(msg));
};
@ -694,6 +694,13 @@ GitEngine.prototype.validateAndMakeTag = function(id, target) {
this.makeTag(id, target);
};
GitEngine.prototype.postProcessBranchID = function(id) {
if (id.match(/\bmaster\b/)) {
id = id.replace(/\bmaster\b/, 'main');
}
return id;
}
GitEngine.prototype.makeBranch = function(id, target) {
// all main branches are stored as master under the hood
if (id.match(/\bmain\b/)) {

View file

@ -1198,7 +1198,7 @@ exports.strings = {
'ko': 'LGB는 모바일에서 입력을 받을 수 없습니다. 데스크톱으로 접속하세요! 이것은 가치가 있습니다. :D',
'vi': 'Đáng tiếc là ứng dụng không thể nhận thông tin từ điện thoại hay máy tính bảng, hãy sử dụng máy tính cá nhân, đáng để bỏ công mà :D',
'sl_SI': 'LGB ne more sprejeti ukazov na mobilni napravi, obiščite nas na računalinku! Je vredno :D ',
'pl' : 'Przepraszamy, ale LearnGitBranching nie da się odbierać poleceń na urządzeniach mobilnych. Odwiedź LearnGitBranching na komputerze stacjonarnym, warto! :D'
'pl' : 'Przepraszamy, ale LearnGitBranching nie obsługuje wpisywania komend z urządzeń mobilnych. Odwiedź LearnGitBranching na komputerze stacjonarnym, warto! :D'
},
///////////////////////////////////////////////////////////////////////////
'share-tree': {

View file

@ -69,6 +69,13 @@ var Level = Sandbox.extend({
// if there is a multiview in the beginning, open that
// and let it resolve our deferred
if (GlobalStateStore.getShouldDisableLevelInstructions()) {
setTimeout(function() {
deferred.resolve();
}, 100);
return;
}
if (this.level.startDialog && !this.testOption('noIntroDialog')) {
new MultiView(Object.assign(
{},
@ -166,6 +173,14 @@ var Level = Sandbox.extend({
startOffCommand: function() {
var method = this.options.command.get('method');
if (GlobalStateStore.getShouldDisableLevelInstructions()) {
Main.getEventBaton().trigger(
'commandSubmitted',
'hint; show goal'
);
return;
}
if (!this.testOption('noStartCommand') && method !== 'importLevelNow') {
Main.getEventBaton().trigger(
'commandSubmitted',

View file

@ -84,6 +84,12 @@ var instantCommands = [
msg: intl.str('flip-tree-command')
});
}],
[/^disableLevelInstructions$/, function() {
GlobalStateActions.disableLevelInstructions();
throw new CommandResult({
msg: intl.todo('Level instructions disabled'),
});
}],
[/^refresh$/, function() {
var events = require('../app').getEvents();

View file

@ -234,6 +234,15 @@ var Sandbox = Backbone.View.extend({
},
resetSolved: function(command, deferred) {
if (command.get('regexResults').input !== 'reset solved --confirm') {
command.set('error', new Errors.GitError({
msg: 'Reset solved will mark each level as not yet solved; because ' +
'this is a destructive command, please pass in --confirm to execute',
}));
command.finishWith(deferred);
return;
}
LevelActions.resetLevelsSolved();
command.addWarning(
intl.str('solved-map-reset')

View file

@ -9,6 +9,7 @@ var ActionTypes = AppConstants.ActionTypes;
var _isAnimating = false;
var _flipTreeY = false;
var _numLevelsSolved = 0;
var _disableLevelInstructions = false;
var GlobalStateStore = Object.assign(
{},
@ -27,6 +28,10 @@ AppConstants.StoreSubscribePrototype,
return _numLevelsSolved;
},
getShouldDisableLevelInstructions: function() {
return _disableLevelInstructions;
},
dispatchToken: AppDispatcher.register(function(payload) {
var action = payload.action;
var shouldInform = false;
@ -44,6 +49,10 @@ AppConstants.StoreSubscribePrototype,
_numLevelsSolved++;
shouldInform = true;
break;
case ActionTypes.DISABLE_LEVEL_INSTRUCTIONS:
_disableLevelInstructions = true;
shouldInform = true;
break;
}
if (shouldInform) {

View file

@ -71,7 +71,7 @@ var sequenceInfo = exports.sequenceInfo = {
'uk' : 'Вступ',
'vi' : 'Giới thiệu chuỗi luyện tập',
'sl_SI': 'Uvodno Zaporedje',
'pl' : 'Sekwencja wprowadzająca'
'pl' : 'Wprowadzenie'
},
about: {
'en_US': 'A nicely paced introduction to the majority of git commands',
@ -292,7 +292,7 @@ var sequenceInfo = exports.sequenceInfo = {
'uk' : 'Різні прийоми роботи з Git, хитрощі та поради',
'vi' : 'Các kỹ thuật, bí quyết, và mẹo vặt hữu ích',
'sl_SI': 'Mešana vreča Git tehnik, trikov in nasvetov',
'pl' : 'Po trochu wszystkiego... wskazóweki i triki'
'pl' : 'Po trochu wszystkiego. Wskazówki i triki'
}
},
advanced: {
@ -313,7 +313,7 @@ var sequenceInfo = exports.sequenceInfo = {
'ko' : '고급 문제',
'vi' : 'Các chủ đề nâng cao',
'sl_SI': 'Napredne Teme',
'pl' : 'Zaawansowane tematy'
'pl' : 'Tematy zaawansowane'
},
about: {
'en_US': 'For the truly brave!',

View file

@ -21,7 +21,8 @@ exports.level = {
"ko" : "Cherry-pick 소개",
"uk": "Знайомство з cherry-pick",
"vi" : "Giới thiệu về cherry-pick",
"sl_SI": "Uvod v Cherry-pick"
"sl_SI": "Uvod v Cherry-pick",
"pl": "Wprowadzenie do Cherry-pick'ingu"
},
"hint": {
"fr_FR": "git cherry-pick suivi par les noms de commits",
@ -38,7 +39,8 @@ exports.level = {
"ko" : "커밋의 이름들로 git cherry-pick 하세요!",
"uk": "git cherry-pick базується на іменах комітів!",
"vi" : "git cherry-pick sau đó là tên commit!",
"sl_SI": "git cherry-pick nato pa imena commitov."
"sl_SI": "git cherry-pick nato pa imena commitov.",
"pl": "git cherry-pick a po nim nazwy commitów!",
},
"startDialog": {
"en_US": {
@ -894,6 +896,63 @@ exports.level = {
}
}
]
}
},
"pl": {
"childViews": [
{
"type": "ModalAlert",
"options": {
"markdowns": [
"## Przenoszenie pracy",
"",
"Do tej pory zajmowaliśmy się podstawami gita - commitowaniem, gałęziami i poruszaniem się w drzewie źródłowym. Tylko te koncepcje wystarczą, aby wykorzystać 90% mocy repozytoriów git i pokryć główne potrzeby deweloperów.",
"",
"Pozostałe 10% może być jednak dość użyteczne podczas niecodziennych zadań (lub gdy o czymś zapomniałeś). Kolejna koncepcja, którą zamierzamy omówić to \"przenoszenie pracy\" - innymi słowy, jest to sposób, w jaki deweloperzy mogą powiedzieć: \"Chcę te zmiany tu i tam\" w precyzyjny, wymowny i elastyczny sposób.",
"",
"To może wydawać się sporo, ale to prosta koncepcja."
]
}
},
{
"type": "ModalAlert",
"options": {
"markdowns": [
"## Git Cherry-pick",
"",
"Pierwsza komenda w tej serii nazywa się `git cherry-pick`. Przyjmuje ona następującą formę:",
"",
"* `git cherry-pick <Commit1> <Commit2> <...>`",
"",
"Jest to bardzo prosty sposób określenia jakie zmiany poniżej swojej obecnej lokalizacji (`HEAD`) chciałbyś przenieść. Osobiście uwielbiam `cherry-pick'ing`, ponieważ jest to proste jak budowa cepa.",
"",
"Zobaczmy demo!",
""
]
}
},
{
"type": "GitDemonstrationView",
"options": {
"beforeMarkdowns": [
"Mamy tutaj repozytorium, gdzie mamy trochę pracy na gałęzi `side`, które chcemy skopiować do gałęzi `main`. Można by to osiągnąć dzięki komendy rebase'owi (którego już się nauczyliśmy), ale zobaczmy, jak działa cherry-pick."
],
"afterMarkdowns": [
"To jest to! Chcieliśmy aby commity `C2` i `C4` i git wziął i dodał do `main`. Bułka z masłem!"
],
"command": "git cherry-pick C2 C4",
"beforeCommand": "git checkout -b side; git commit; git commit; git commit; git checkout main; git commit;"
}
},
{
"type": "ModalAlert",
"options": {
"markdowns": [
"Aby ukończyć ten poziom, po prostu skopiuj część pracy z trzech pokazanych gałęzi `main`. Commity, które należy skopiować znajdują się na wizualizacji celu.",
""
]
}
}
]
},
}
};

View file

@ -21,7 +21,8 @@ exports.level = {
"ko" : "리베이스할 타겟으로 브랜치나 상대 참조(HEAD~)를 사용할 수 있습니다",
"uk" : "ти можеш використовувати гілки чи відносні посилання (HEAD~) щоб вказувати ціль для rebase",
"vi": "bạn có thể sử dụng tham chiếu tương đối (HEAD~) hoặc nhánh để chỉ định mục tiêu rebase",
"sl_SI": "Uporabiš lahko bilokateri branch ali relativno referenco (HEAD~), da določiš cilj za rebase."
"sl_SI": "Uporabiš lahko bilokateri branch ali relativno referenco (HEAD~), da določiš cilj za rebase.",
"pl": "Możesz użyć gałęzi lub referencji względnych (HEAD~), aby określić cel rebase'a"
},
"name": {
"en_US": "Interactive Rebase Intro",
@ -38,7 +39,8 @@ exports.level = {
"ko" : "인터랙티브 리베이스 소개",
"uk" : "Знайомство з інтерактивним rebase",
"vi" : "Giới thiệu về tương tác rebase",
"sl_SI": "Interaktivni uvod v Rebase"
"sl_SI": "Interaktivni uvod v Rebase",
"pl": "Interaktywne wprowadzenie do Rebase'a",
},
"startDialog": {
"en_US": {
@ -75,10 +77,12 @@ exports.level = {
"markdowns": [
"When the interactive rebase dialog opens, you have the ability to do two things in our educational application:",
"",
"* You can reorder commits simply by changing their order in the UI (in our window this means dragging and dropping with the mouse).",
"* You can choose to completely omit some commits. This is designated by `pick` -- toggling `pick` off means you want to drop the commit.",
"* You can reorder commits simply by changing their order in the UI (via dragging and dropping with the mouse).",
"* You can choose to keep all commits or drop specific ones. When the dialog opens, each commit is set to be included by the `pick` " +
"button next to it being active. To drop a commit, toggle off its `pick` button.",
"",
"*It is worth mentioning that in the real git interactive rebase you can do many more things like squashing (combining) commits, amending commit messages, and even editing the commits themselves. For our purposes though we will focus on these two operations above.*",
"*It is worth mentioning that in the real git interactive rebase you can do many more things like squashing (combining) commits, " +
"amending commit messages, and even editing the commits themselves. For our purposes though we will focus on these two operations above.*",
"",
"Great! Let's see an example."
]
@ -1016,6 +1020,72 @@ exports.level = {
}
}
]
}
},
"pl": {
"childViews": [
{
"type": "ModalAlert",
"options": {
"markdowns": [
"## Interaktywny Rebase w Gitcie",
"",
"Cherry-pick'ing jest świetny, gdy wiesz, które commity (_oraz_ znasz ich hasze) chcesz przenieść - trudno jest dyskutować z prostotą, którą zapewnia.",
"",
"Ale co w sytuacji, gdy nie wiesz, które commity chcesz przenieść? Na szczęście git jest przygotowany również na tą sytuację! Możemy wykorzystać do tego interaktywny rebasing - to najlepszy sposób, aby przejrzeć serię commitów, które zamierzasz rebase'ować.",
"",
"Przejdźmy do szczegółów..."
]
}
},
{
"type": "ModalAlert",
"options": {
"markdowns": [
"Wszystkie interaktywne znaczniki rebase używają polecenia `rebase` z opcją `-i`.",
"",
"Jeśli włączysz tę opcję, git otworzy okno, aby pokazać ci, które commity mają być skopiowane poniżej wskazanego celu (np. HEAD'a) do rebase'a. W oknie pokażą się również wiadomości i hasze commitów, co zdecydowanie ułatwia zrozumienie co jest czym.",
"",
"Dla \"prawdziwego\" gita, otwarte okno oznacza otwarcie pliku w edytorze tekstu takim jak np. `vim`. Dla naszych potrzeb, zbudowałem małe okno dialogowe, które zachowuje się tak samo."
]
}
},
{
"type": "ModalAlert",
"options": {
"markdowns": [
"Kiedy otworzy się interaktywne okno dialogowe rebase, masz możliwość zrobienia dwóch rzeczy w naszej aplikacji edukacyjnej:",
"",
"* Możesz zmienić kolejność commitów poprzez zmianę ich kolejności w oknie (przeciągając je i upuszczając).",
"* Możesz zdecydować się na całkowite pominięcie niektórych commitów. Jest to oznaczone przez `pick` -- wpisanie `pick` off oznacza, że nie chcesz uwzględnić tego commitu.",
"",
"* Warto wspomnieć, że w prawdziwym interaktywnym rebasie możesz zrobić wiele innych rzeczy, takich jak squash (łączenie) commitów, poprawianie wiadomości commitów, a nawet edycja samych commitów. Dla naszych potrzeb jednak skupimy się na tych dwóch operacjach powyżej. *",
"",
"Świetnie! Spójrz na przykład."
]
}
},
{
"type": "GitDemonstrationView",
"options": {
"beforeMarkdowns": [
"Po naciśnięciu przycisku, pojawi się interaktywne okno rebase'owania. Zmień kolejność niektórych commitów (lub usuń niektóre z nich, a co!) i zobacz wynik!"
],
"afterMarkdowns": [
"Boom! Git skopiował commity w ten sam sposób w jaki podałeś to w oknie."
],
"command": "git rebase -i HEAD~4 --aboveAll",
"beforeCommand": "git commit; git commit; git commit; git commit"
}
},
{
"type": "ModalAlert",
"options": {
"markdowns": [
"Aby ukończyć ten poziom, zrób interaktywny rebase i osiągnij kolejność pokazaną w wizualizacji celu. Pamiętaj, że zawsze możesz użyć komend `undo` lub `reset` aby naprawić błędy :D"
]
}
}
]
},
}
};

View file

@ -79,13 +79,13 @@ exports.level = {
"markdowns": [
"### Can I specify this myself?",
"",
"Yes you can! You can make any arbitrary branch track `o/main`, and if you do so, that branch will have the same implied push destination and merge target as `main`. This means you can run `git push` on a branch named `totallyNotMaster` and have your work pushed to the `main` branch on the remote!",
"Yes you can! You can make any arbitrary branch track `o/main`, and if you do so, that branch will have the same implied push destination and merge target as `main`. This means you can run `git push` on a branch named `totallyNotMain` and have your work pushed to the `main` branch on the remote!",
"",
"There are two ways to set this property. The first is to checkout a new branch by using a remote branch as the specified ref. Running",
"",
"`git checkout -b totallyNotMaster o/main`",
"`git checkout -b totallyNotMain o/main`",
"",
"Creates a new branch named `totallyNotMaster` and sets it to track `o/main`."
"Creates a new branch named `totallyNotMain` and sets it to track `o/main`."
]
}
},
@ -197,13 +197,13 @@ exports.level = {
"markdowns": [
"### Puis-je configurer cette relation moi-même ?",
"",
"Absolument ! Vous pouvez suivre `o/main` depuis n'importe quelle branche, et si vous le faîtes, cette branche va avoir la même destination de push et cible de merge que pour `main`. Cela signifie que vous pouvez exécuter `git push` sur une branche nommée `totallyNotMaster` mais envoyer tout de même votre travail sur la branche `main` du dépôt distant !",
"Absolument ! Vous pouvez suivre `o/main` depuis n'importe quelle branche, et si vous le faîtes, cette branche va avoir la même destination de push et cible de merge que pour `main`. Cela signifie que vous pouvez exécuter `git push` sur une branche nommée `totallyNotMain` mais envoyer tout de même votre travail sur la branche `main` du dépôt distant !",
"",
"Il y a deux façons de configurer cette propriété. La première est de créer une nouvelle branche en la branchant immédiatement sur la branche distante, à l'aide de `git checkout -b` :",
"",
"`git checkout -b totallyNotMaster o/main`",
"`git checkout -b totallyNotMain o/main`",
"",
"Cette commande crée une nouvelle branche nommée `totallyNotMaster` et la configure pour suivre `o/main`."
"Cette commande crée une nouvelle branche nommée `totallyNotMain` et la configure pour suivre `o/main`."
]
}
},
@ -793,13 +793,13 @@ exports.level = {
"markdowns": [
"### 我可以自己設定嗎?",
"",
"是的你可以!你可以設定任何的 branch 來 track `o/main` 假如你真的這麼做的話,那麼該 branch 的 push 及 merge 的目標就會跟 `main` 一樣。這就表示說你可以在 `totallyNotMaster` branch 上面執行 `git push`,並且 push 你的 commit 到 remote 的 `main` branch",
"是的你可以!你可以設定任何的 branch 來 track `o/main` 假如你真的這麼做的話,那麼該 branch 的 push 及 merge 的目標就會跟 `main` 一樣。這就表示說你可以在 `totallyNotMain` branch 上面執行 `git push`,並且 push 你的 commit 到 remote 的 `main` branch",
"",
"有兩個方式可以設定,第一個就是藉由參考一個 remote branch 來 checkout 一個新的 branch。執行",
"",
"`git checkout -b totallyNotMaster o/main`",
"`git checkout -b totallyNotMain o/main`",
"",
"建立一個新的 `totallyNotMaster` branch 並且它會 track `o/main`。"
"建立一個新的 `totallyNotMain` branch 並且它會 track `o/main`。"
]
}
},
@ -912,13 +912,13 @@ exports.level = {
"markdowns": [
"### 我能自己指定这个属性吗?",
"",
"当然可以啦!你可以让任意分支跟踪 `o/main`, 然后该分支会像 `main` 分支一样得到隐含的 push 目的地以及 merge 的目标。 这意味着你可以在分支 `totallyNotMaster` 上执行 `git push`,将工作推送到远程仓库的 `main` 分支上。",
"当然可以啦!你可以让任意分支跟踪 `o/main`, 然后该分支会像 `main` 分支一样得到隐含的 push 目的地以及 merge 的目标。 这意味着你可以在分支 `totallyNotMain` 上执行 `git push`,将工作推送到远程仓库的 `main` 分支上。",
"",
"有两种方法设置这个属性,第一种就是通过远程分支检出一个新的分支,执行: ",
"",
"`git checkout -b totallyNotMaster o/main`",
"`git checkout -b totallyNotMain o/main`",
"",
"就可以创建一个名为 `totallyNotMaster` 的分支,它跟踪远程分支 `o/main`。"
"就可以创建一个名为 `totallyNotMain` 的分支,它跟踪远程分支 `o/main`。"
]
}
},
@ -1144,13 +1144,13 @@ exports.level = {
"markdowns": [
"### А могу ли я сделать это самостоятельно?",
"",
"Само собой! Вы можете сказать любой из веток, чтобы она отслеживала `o/main`, и если вы так сделаете, эта ветка будет иметь такой же пункт назначения для push и merge как и локальная ветка `main`. Это значит, что вы можете выполнить `git push`, находясь на ветке `totallyNotMaster`, и все ваши наработки с ветки `totallyNotMaster` будут закачены на ветку `main` удалённого репозитория!",
"Само собой! Вы можете сказать любой из веток, чтобы она отслеживала `o/main`, и если вы так сделаете, эта ветка будет иметь такой же пункт назначения для push и merge как и локальная ветка `main`. Это значит, что вы можете выполнить `git push`, находясь на ветке `totallyNotMain`, и все ваши наработки с ветки `totallyNotMain` будут закачены на ветку `main` удалённого репозитория!",
"",
"Есть два способа сделать это. Первый - это выполнить checkout для новой ветки, указав удалённую ветку в качестве ссылки. Для этого необходимо выполнить команду",
"",
"`git checkout -b totallyNotMaster o/main`",
"`git checkout -b totallyNotMain o/main`",
"",
", которая создаст новую ветку с именем `totallyNotMaster` и укажет ей следить за `o/main`."
", которая создаст новую ветку с именем `totallyNotMain` и укажет ей следить за `o/main`."
]
}
},
@ -1266,9 +1266,9 @@ exports.level = {
"",
"このプロパティを設定するには2つの方法があります。一つ目は、リモートブランチのリファレンスを使用して新しいブランチをチェックアウトするというものです。例えば次のコマンドを走らせてます",
"",
"`git checkout -b totallyNotMaster o/main`",
"`git checkout -b totallyNotMain o/main`",
"",
"これは`totallyNotMaster`という名前のブランチを新しく作り、`o/main`への追跡プロパティを設定します。"
"これは`totallyNotMain`という名前のブランチを新しく作り、`o/main`への追跡プロパティを設定します。"
]
}
},
@ -1380,13 +1380,13 @@ exports.level = {
"markdowns": [
"### 내 스스로 지정할수도 있나요?",
"",
"당연하죠! 여러분은 아무 임의의 브랜치를 `o/main`를 추적하게 만들 수 있습니다. 이렇게 하면 이 브랜치 또한 내재된 push,merge 목적지를 `main`로 할 것입니다. 여러분은 이제 `totallyNotMaster`라는 브랜치에서 `git push`를 수행해서 원격 저장소의 브랜치 `main`로 작업을 push할 수 있습니다!",
"당연하죠! 여러분은 아무 임의의 브랜치를 `o/main`를 추적하게 만들 수 있습니다. 이렇게 하면 이 브랜치 또한 내재된 push,merge 목적지를 `main`로 할 것입니다. 여러분은 이제 `totallyNotMain`라는 브랜치에서 `git push`를 수행해서 원격 저장소의 브랜치 `main`로 작업을 push할 수 있습니다!",
"",
"이 속성을 설정하는데에는 두가지 방법이 있습니다. 첫 번째는 지정한 원격 브랜치를 참조해서 새로운 브랜치를 생성하여 checkout 하는 방법 입니다. 다음을 실행하면",
"",
"`git checkout -b totallyNotMaster o/main`",
"`git checkout -b totallyNotMain o/main`",
"",
"`totallyNotMaster`라는 이름의 새 브랜치를 생성하고 `o/main`를 추적하게 설정합니다."
"`totallyNotMain`라는 이름의 새 브랜치를 생성하고 `o/main`를 추적하게 설정합니다."
]
}
},
@ -1498,13 +1498,13 @@ exports.level = {
"markdowns": [
"### А можу я сам вибирати?",
"",
"Так, можеш! Ти можеш вибрати довільну гілку, яка слідкуватиме за `o/main`, і тоді для цієї гілки `push` та `merge` автоматично працюватимуть з `main`. Це означає, що виконання `git push` в гілці з назвою `totallyNotMaster` (зовсім не main) може зберегти локальні коміти у віддалену гілку `main`!",
"Так, можеш! Ти можеш вибрати довільну гілку, яка слідкуватиме за `o/main`, і тоді для цієї гілки `push` та `merge` автоматично працюватимуть з `main`. Це означає, що виконання `git push` в гілці з назвою `totallyNotMain` (зовсім не main) може зберегти локальні коміти у віддалену гілку `main`!",
"",
"Є два шляхи встановити такий зв'язок. Перший - створити нову гілку з явним вказанням зв'язку (за ким слідкувати). Виконання",
"",
"`git checkout -b totallyNotMaster o/main`",
"`git checkout -b totallyNotMain o/main`",
"",
"створить гілку `totallyNotMaster`, яка слідкує за `o/main`."
"створить гілку `totallyNotMain`, яка слідкує за `o/main`."
]
}
},
@ -1616,13 +1616,13 @@ exports.level = {
"markdowns": [
"### Tôi có thể tự chỉ định chứ?",
"",
"Tất nhiên là được chứ! Bạn có thế khiến bất kỳ nhánh nào theo dõi nhánh `o/main`, và nếu bạn làm vậy, nhánh đó sẽ được được chỉ định đích của lệnh đẩy và mục tiêu hợp nhất giống như nhánh `main`. Điều này có nghĩa là bạn có thể chạy lệnh `git push` trên nhánh có tên là `totallyNotMaster` và thành quả của bạn sẽ được đẩy lên nhánh `main` ở kho chứa từ xa!",
"Tất nhiên là được chứ! Bạn có thế khiến bất kỳ nhánh nào theo dõi nhánh `o/main`, và nếu bạn làm vậy, nhánh đó sẽ được được chỉ định đích của lệnh đẩy và mục tiêu hợp nhất giống như nhánh `main`. Điều này có nghĩa là bạn có thể chạy lệnh `git push` trên nhánh có tên là `totallyNotMain` và thành quả của bạn sẽ được đẩy lên nhánh `main` ở kho chứa từ xa!",
"",
"Có 2 cách để thiết lập thuộc tính này. Cách đầu tiên là chuyển sang một nhánh mới từ một nhánh từ xa bằng cách thực hiện",
"",
"`git checkout -b totallyNotMaster o/main`",
"`git checkout -b totallyNotMain o/main`",
"",
"Tạo ra một nhánh mới `totallyNotMaster` và thiết lập cho nó theo dõi nhánh `o/main`."
"Tạo ra một nhánh mới `totallyNotMain` và thiết lập cho nó theo dõi nhánh `o/main`."
]
}
},

View file

@ -260,6 +260,14 @@ body.hgMode .visBackgroundColor {
min-height: 400px;
}
div.ui-draggable-handle {
cursor: grab;
}
div.ui-draggable-dragging div.ui-draggable-handle {
cursor: grabbing;
}
div.canvasTerminalHolder > div.terminal-window-holder > div.wrapper {
height: 100%;
box-shadow: 0 0 12px rgb(0,0,0);
@ -433,6 +441,10 @@ div.toolbar > div.controls div.box.flex1 div:hover {
}
div.ui-draggable div.controls div.box.flex1 div {
cursor: pointer;
}
div.controls div.box.flex1 div.close {
background-color: #fb625f;
}

View file

@ -445,7 +445,7 @@
</div>
<a target="_blank" rel="noreferrer noopener" href="https://github.com/pcottle/learnGitBranching" class="github-corner" aria-label="View source on GitHub">
<svg width, height="7vmin" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true">
<svg viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0; height: 7vmin;" aria-hidden="true">
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>