Skip to content

Commit

Permalink
Move deleting local branches into examples section.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei Wang committed Apr 2, 2013
1 parent b0b37f1 commit 06c891a
Showing 1 changed file with 47 additions and 42 deletions.
89 changes: 47 additions & 42 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h4>&nbsp;</h4>
<div class="twocol">
<h4>Undo/Delete</h4>
<a id="open-reset" class="openswitch" href="#">git reset</a>
<a id="open-branch-d" class="openswitch" href="#">git branch -d</a>

</div>
<div class="twocol">
<h4>Combine Branches</h4>
Expand Down Expand Up @@ -73,8 +73,12 @@ <h4>&nbsp;</h4>
</div>
<div id="ExplainGitBranch-Container" class="twelvecol concept-container">
<p>
<span class="cmd">git branch name</span> will create a new branch named "name".
Creating branches just creates a new tag pointing to the currently checked out commit.
</p>
<p>
Branches can be deleted using the command <span class="cmd">git branch -d name</span>.
</p>
<p>
Type <span class="cmd">git commit</span> and <span class="cmd">git branch</span> commands
to your hearts desire until you understand this concept.
Expand Down Expand Up @@ -133,14 +137,6 @@ <h4>&nbsp;</h4>
</p>
<div class="playground-container"></div>
</div>
<div id="ExplainGitBranch-d-Container" class="twelvecol concept-container">
<p>
<span class="cmd">git branch -d</span> is used to delete branches.
I have pre-created a bunch of branches for you to delete in the playground below.
Have at it.
</p>
<div class="playground-container"></div>
</div>
<div id="ExplainGitMerge-Container" class="twelvecol concept-container">
<p>
<span class="cmd">git merge</span> will create a new commit with two parents. The resulting
Expand Down Expand Up @@ -221,6 +217,14 @@ <h4>&nbsp;</h4>
</p>
<div class="playground-container"></div>
</div>
<div id="ExplainGitDeleteBranches-Container" class="twelvecol concept-container">
<p>
<span class="cmd">git branch -d</span> is used to delete branches.
I have pre-created a bunch of branches for you to delete in the playground below.
Have at it.
</p>
<div class="playground-container"></div>
</div>
<div id="ExplainGitFree-Container" class="twelvecol concept-container">
<p>
Do whatever you want in this free playground.
Expand All @@ -238,6 +242,7 @@ <h2>Specific Examples</h2>
<div class="tencol">
<a id="open-clean" class="openswitch" href="#">Restore Local Branch to State on Origin Server</a>
<a id="open-fetchrebase" class="openswitch" href="#">Update Private Local Branch with Latest from Origin</a>
<a id="open-deletebranches" class="openswitch" href="#">Deleting Local Branches</a>
</div>
<div class="twocol last">
<a id="open-freeplay" class="openswitch" href="#">Free Playground</a>
Expand Down Expand Up @@ -390,39 +395,6 @@ <h2>Specific Examples</h2>
});
</script>

<script type="text/javascript">
require(['explaingit'], function (explainGit) {
var openSwitch = document.getElementById('open-branch-d'),
open;

open = function () {
explainGit.reset();
this.classList.add('selected');

explainGit.open({
name: 'Branch-d',
height: 500,
baseLine: 0.6,
commitData: [
{id: 'e137e9b'},
{id: 'bb92e0e', parent: 'e137e9b'},
{id: 'd25ee9b', parent: 'bb92e0e', tags: ['master']},
{id: '071ff28', parent: 'e137e9b', tags: ['protoss']},
{id: 'f5b32c8', parent: 'bb92e0e'},
{id: 'e088135', parent: 'f5b32c8', tags: ['zerg']},
{id: '9e6c322', parent: 'bb92e0e'},
{id: '593ae02', parent: '9e6c322', tags: ['terran']}
],
currentBranch: 'terran',
initialMessage:
'Delete some branches.'
});
};

openSwitch.addEventListener('click', open, false);
});
</script>

<script type="text/javascript">
require(['explaingit'], function (explainGit) {
var openSwitch = document.getElementById('open-merge'),
Expand Down Expand Up @@ -637,6 +609,39 @@ <h2>Specific Examples</h2>
});
</script>

<script type="text/javascript">
require(['explaingit'], function (explainGit) {
var openSwitch = document.getElementById('open-deletebranches'),
open;

open = function () {
explainGit.reset();
this.classList.add('selected');

explainGit.open({
name: 'DeleteBranches',
height: 500,
baseLine: 0.6,
commitData: [
{id: 'e137e9b'},
{id: 'bb92e0e', parent: 'e137e9b'},
{id: 'd25ee9b', parent: 'bb92e0e', tags: ['master']},
{id: '071ff28', parent: 'e137e9b', tags: ['protoss']},
{id: 'f5b32c8', parent: 'bb92e0e'},
{id: 'e088135', parent: 'f5b32c8', tags: ['zerg']},
{id: '9e6c322', parent: 'bb92e0e'},
{id: '593ae02', parent: '9e6c322', tags: ['terran']}
],
currentBranch: 'terran',
initialMessage:
'Delete some branches.'
});
};

openSwitch.addEventListener('click', open, false);
});
</script>

<script type="text/javascript">
require(['explaingit'], function (explainGit) {
var openSwitch = document.getElementById('open-freeplay'),
Expand Down

0 comments on commit 06c891a

Please sign in to comment.