Compare commits

...

No commits in common. "master" and "pages" have entirely different histories.

38 changed files with 8856 additions and 384 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
site/

0
.nojekyll Normal file
View File

157
404.html Normal file
View File

@ -0,0 +1,157 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/img/favicon.ico">
<title>learngit</title>
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/font-awesome.min.css" rel="stylesheet">
<link href="/css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/darcula.min.css">
<script src="/js/jquery-1.10.2.min.js" defer></script>
<script src="/js/bootstrap.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="/.">learngit</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="navitem">
<a href="/." class="nav-link">learngit</a>
</li>
<li class="navitem">
<a href="/branching_strategies/" class="nav-link">branching</a>
</li>
<li class="navitem">
<a href="/common_commands/" class="nav-link">common commands</a>
</li>
<li class="navitem">
<a href="/glossary/" class="nav-link">glossary</a>
</li>
<li class="navitem">
<a href="/ssh_setup/" class="nav-link">ssh key setup</a>
</li>
</ul>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="nav-item">
<a href="https://github.com/benharri/learngit/" class="nav-link"><i class="fa fa-github"></i> GitHub</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="row-fluid">
<div id="main-content" class="span12">
<h1 id="404-page-not-found" style="text-align: center">404</h1>
<p style="text-align: center"><strong>Page not found</strong></p>
</div>
</div>
</div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "/",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="/js/base.js" defer></script>
<script src="/search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,201 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../img/favicon.ico">
<title>branching - learngit</title>
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/font-awesome.min.css" rel="stylesheet">
<link href="../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/darcula.min.css">
<script src="../js/jquery-1.10.2.min.js" defer></script>
<script src="../js/bootstrap.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="..">learngit</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="navitem">
<a href=".." class="nav-link">learngit</a>
</li>
<li class="navitem active">
<a href="./" class="nav-link">branching</a>
</li>
<li class="navitem">
<a href="../common_commands/" class="nav-link">common commands</a>
</li>
<li class="navitem">
<a href="../glossary/" class="nav-link">glossary</a>
</li>
<li class="navitem">
<a href="../ssh_setup/" class="nav-link">ssh key setup</a>
</li>
</ul>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="nav-item">
<a rel="prev" href=".." class="nav-link">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li class="nav-item">
<a rel="next" href="../common_commands/" class="nav-link">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
<li class="nav-item">
<a href="https://github.com/benharri/learngit/blob/master/docs/branching_strategies.md" class="nav-link"><i class="fa fa-github"></i> Edit on GitHub</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
<div class="navbar-header">
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
<span class="fa fa-angle-down"></span>
</button>
</div>
<div id="toc-collapse" class="navbar-collapse collapse card bg-light">
<ul class="nav flex-column">
<li class="nav-item" data-level="1"><a href="#branching" class="nav-link">branching</a>
<ul class="nav flex-column">
<li class="nav-item" data-level="2"><a href="#branch-to-env-mapping" class="nav-link">Branch to env mapping</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div></div>
<div class="col-md-9" role="main">
<h1 id="branching">branching<a class="headerlink" href="#branching" title="Permanent link">&para;</a></h1>
<hr />
<h2 id="branch-to-env-mapping">Branch to env mapping<a class="headerlink" href="#branch-to-env-mapping" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="https://www.wearefine.com/mingle/env-branching-with-git/">Env branch mapping</a></li>
<li><a href="https://docs.gitlab.com/ee/workflow/gitlab_flow.html">gitlab flow</a></li>
<li><a href="http://endoflineblog.com/oneflow-a-git-branching-model-and-workflow">oneflow</a> (gitflow with one instead of two long-living branches)</li>
</ul>
<h3 id="branch-env">branch -&gt; env<a class="headerlink" href="#branch-env" title="Permanent link">&para;</a></h3>
<ul>
<li>prod -&gt; prod</li>
<li>mo -&gt; mo</li>
<li>qa -&gt; qa</li>
<li><strong>master</strong> -&gt; dev (feature branches are created from master)<ul>
<li>specific tagged commits can be deployed from master to any of the dev or qa envs</li>
</ul>
</li>
</ul>
<p>Env configs can be generated with a combination of env vars and other source-controlled files</p></div>
</div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../js/base.js" defer></script>
<script src="../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>

322
common_commands/index.html Normal file
View File

@ -0,0 +1,322 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../img/favicon.ico">
<title>common commands - learngit</title>
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/font-awesome.min.css" rel="stylesheet">
<link href="../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/darcula.min.css">
<script src="../js/jquery-1.10.2.min.js" defer></script>
<script src="../js/bootstrap.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="..">learngit</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="navitem">
<a href=".." class="nav-link">learngit</a>
</li>
<li class="navitem">
<a href="../branching_strategies/" class="nav-link">branching</a>
</li>
<li class="navitem active">
<a href="./" class="nav-link">common commands</a>
</li>
<li class="navitem">
<a href="../glossary/" class="nav-link">glossary</a>
</li>
<li class="navitem">
<a href="../ssh_setup/" class="nav-link">ssh key setup</a>
</li>
</ul>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="nav-item">
<a rel="prev" href="../branching_strategies/" class="nav-link">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li class="nav-item">
<a rel="next" href="../glossary/" class="nav-link">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
<li class="nav-item">
<a href="https://github.com/benharri/learngit/blob/master/docs/common_commands.md" class="nav-link"><i class="fa fa-github"></i> Edit on GitHub</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
<div class="navbar-header">
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
<span class="fa fa-angle-down"></span>
</button>
</div>
<div id="toc-collapse" class="navbar-collapse collapse card bg-light">
<ul class="nav flex-column">
<li class="nav-item" data-level="1"><a href="#common-commands" class="nav-link">common commands</a>
<ul class="nav flex-column">
<li class="nav-item" data-level="2"><a href="#add" class="nav-link">add</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#branch" class="nav-link">branch</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#checkout" class="nav-link">checkout</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#clone" class="nav-link">clone</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#commit" class="nav-link">commit</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#diff" class="nav-link">diff</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#fetch" class="nav-link">fetch</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#init" class="nav-link">init</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#log" class="nav-link">log</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#merge" class="nav-link">merge</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#pull" class="nav-link">pull</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#push" class="nav-link">push</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div></div>
<div class="col-md-9" role="main">
<h1 id="common-commands">common commands<a class="headerlink" href="#common-commands" title="Permanent link">&para;</a></h1>
<p>These are commands and options that I use frequently. See the linked documentation for more options and information.</p>
<hr />
<h2 id="add"><a href="https://git-scm.com/docs/git-add">add</a><a class="headerlink" href="#add" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git add [--all] [&lt;files&gt;]</code></p>
</blockquote>
<p>Add files from the working tree to the staging area. <a href="#commit"><code>commit</code></a> operates on the staging area.</p>
<p>Try interactive staging: <code>git add -i</code></p>
<h2 id="branch"><a href="https://git-scm.com/docs/git-commit">branch</a><a class="headerlink" href="#branch" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git branch [&lt;branch&gt;]</code></p>
</blockquote>
<p>Show branches and create new ones.</p>
<h2 id="checkout"><a href="https://git-scm.com/docs/git-checkout">checkout</a><a class="headerlink" href="#checkout" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git checkout [&lt;branch&gt;]</code></p>
</blockquote>
<p>Switch branches or restore working tree files.</p>
<p>The <code>-b</code> switch creates the branch if it doesn't exist and switches to it.</p>
<h2 id="clone"><a href="https://git-scm.com/docs/git-clone">clone</a><a class="headerlink" href="#clone" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git clone [&lt;remote_url&gt;] [directory_to_clone_into]</code></p>
</blockquote>
<p>Download a copy of a remote repository from a server.</p>
<h2 id="commit"><a href="https://git-scm.com/docs/git-commit">commit</a><a class="headerlink" href="#commit" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git commit [-a] [-m "commit message here"]</code></p>
</blockquote>
<p>Create a snapshot of the staging area. Record staged changes.</p>
<p>The <code>-a</code> switch will add all modified and deleted files (will not pick up new files that have been added to the repo) to the staging area before committing.</p>
<h2 id="diff"><a href="https://git-scm.com/docs/git-diff">diff</a><a class="headerlink" href="#diff" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git diff [&lt;from_path-spec&gt;]..[&lt;to_path-spec&gt;]</code></p>
</blockquote>
<p>Show changes by line. With no arguments, <code>diff</code> shows all unstaged changes.</p>
<p>Other uses would be comparing changes between branches or between a range of commits (referred to by their hashes, which you can see with <a href="#log"><code>log</code></a>).</p>
<h2 id="fetch"><a href="https://git-scm.com/docs/git-fetch">fetch</a><a class="headerlink" href="#fetch" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git fetch [&lt;repository&gt; [&lt;refspec&gt;]]</code></p>
</blockquote>
<p>Download objects and refs from another (usually remote) repository.</p>
<h2 id="init"><a href="https://git-scm.com/docs/git-init">init</a><a class="headerlink" href="#init" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git init [--bare] [--shared] [&lt;directory&gt;]</code></p>
</blockquote>
<p>Create an empty repo or reinitialize an existing one.</p>
<h2 id="log"><a href="https://git-scm.com/docs/git-log">log</a><a class="headerlink" href="#log" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git log [&lt;revision range&gt;]</code></p>
</blockquote>
<p>Show commit logs. There are a lot of options here. Check out the documentation.</p>
<p>Here are some of the log options that I use often. Some tips were taken from <a href="https://github.com/git-tips/tips">git-tips</a></p>
<p>All commits since forking from master
* <code>git log --no-merges --stat --reverse master..</code></p>
<p>Visualize the history as a tree
* <code>git log --pretty=oneline --graph --decorate --all</code></p>
<p><img alt="pretty oneline" src="../img/pretty-oneline.png" /></p>
<p>List changes specific to a certain file
* <code>git log --follow -p -- &lt;file_path&gt;</code></p>
<h2 id="merge"><a href="https://git-scm.com/docs/git-merge">merge</a><a class="headerlink" href="#merge" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git merge [&lt;branch&gt;]</code></p>
</blockquote>
<p>Join two or more development histories together.</p>
<p><code>merge</code> incorporates changes from the named commits provided as arguments into the current branch.</p>
<p>Sometimes you will have changed the same line as someone else. This will result in a merge conflict. Some GUI clients have tools to help resolve merge conflicts, but it is good to know how to do it manually.</p>
<pre><code>Here are lines that are either unchanged from the common
ancestor, or cleanly resolved because only one side changed.
&lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
Conflict resolution is hard;
let's go shopping.
=======
Git makes conflict resolution easy.
&gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
And here is another line that is cleanly resolved or unmodified.
</code></pre>
<ul>
<li>This is what you will see as the result of a merge conflict. Simply keep the lines you would like, remove the conflict markers, and commit the result.</li>
</ul>
<p>See the documentation for more info on how to resolve merge conflicts.</p>
<h2 id="pull"><a href="https://git-scm.com/docs/git-pull">pull</a><a class="headerlink" href="#pull" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git pull [--rebase] [--ff] [--no-ff] [&lt;remote name&gt;] [&lt;branch name&gt;]</code></p>
</blockquote>
<p><code>pull</code> is a synonym for <a href="#fetch"><code>fetch</code></a> followed immediately by a <a href="#merge"><code>merge</code></a>. It's a nice shortcut for that.</p>
<p>Use the <code>--rebase</code> option when you haven't made any changes and want to get the latest changes that others have pushed to the remote.</p>
<p>To sync with remote and overwrite local changes:</p>
<blockquote>
<p><code>git fetch origin &amp;&amp; git reset --hard origin/master &amp;&amp; git clean -f -d</code></p>
</blockquote>
<h2 id="push"><a href="https://git-scm.com/docs/git-push">push</a><a class="headerlink" href="#push" title="Permanent link">&para;</a></h2>
<blockquote>
<p><code>git push [-u] [&lt;remote name&gt;] [&lt;branch name&gt;]</code></p>
</blockquote>
<p>The <code>-u</code> option will set the following branch and remote to the default upstream. This means you can simply do <code>git pull</code> without the <a href="../glossary/#refspec">refspec</a>.</p></div>
</div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../js/base.js" defer></script>
<script src="../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>

273
css/base.css Normal file
View File

@ -0,0 +1,273 @@
html {
/* The nav header is 3.5rem high, plus 20px for the margin-top of the
main container. */
scroll-padding-top: calc(3.5rem + 20px);
}
body > .container {
margin-top: 20px;
}
.navbar.fixed-top {
position: -webkit-sticky;
position: sticky;
}
.source-links {
float: right;
}
.col-md-9 img {
max-width: 100%;
}
pre, code {
background: #555;
color: #bababa;
border: 1px solid rgba(0,0,0,0.125);
border-radius: 0.25rem;
}
pre {
padding: 0.5em;
}
code {
padding: 1px 3px;
}
pre code {
border: none;
/* Override styles from hljs theme */
background: transparent !important;
padding: 0 !important;
}
a code {
color: #2a9fd6;
}
a:hover code {
color: #1d7097;
}
kbd {
padding: 2px 4px;
font-size: 90%;
color: #fff;
background-color: #333;
border-radius: 3px;
-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
}
footer {
margin-top: 30px;
margin-bottom: 10px;
text-align: center;
font-weight: 200;
}
.modal-dialog {
margin-top: 60px;
}
/* Style the admonitions. */
.admonition {
margin-bottom: 1em;
border: 1px solid rgba(0, 0, 0, 0.125);
border-radius: 0.25rem;
background-color: #282828;
}
.admonition > .admonition-title {
margin: 0;
padding: 0.75rem 1rem;
background: rgba(0, 0, 0, 0.03);
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
font-size: 1rem;
}
.admonition > * {
margin-left: 1rem;
margin-right: 1rem;
}
.admonition > *:not(.admonition-title):first-of-type,
.admonition > .admonition-title + * {
margin-top: 1rem;
}
.admonition > *:last-child {
margin-bottom: 1rem;
}
/* Style each kind of admonition. */
.admonition.note, .admonition.note > .admonition-title {
border-color: #6e2caf;
}
.admonition.note > .admonition-title {
color: #fff;
background-color: #9933cc;
}
.admonition.warning, .admonition.warning > .admonition-title {
border-color: #f05800;
}
.admonition.warning > .admonition-title {
color: #fff;
background-color: #ff8800;
}
.admonition.danger, .admonition.danger > .admonition-title {
border-color: #bd001f;
}
.admonition.danger > .admonition-title {
color: #fff;
background-color: #cc0000;
}
/*
* Side navigation
*
* Scrollspy and affixed enhanced navigation to highlight sections and secondary
* sections of docs content.
*/
.bs-sidebar.affix {
position: -webkit-sticky;
position: sticky;
/* The nav header is 3.5rem high, plus 20px for the margin-top of the
main container. */
top: calc(3.5rem + 20px);
}
.bs-sidebar.card {
padding: 0;
}
/* Toggle (vertically flip) sidebar collapse icon */
.bs-sidebar .navbar-toggler span {
-moz-transform: scale(1, -1);
-webkit-transform: scale(1, -1);
-o-transform: scale(1, -1);
-ms-transform: scale(1, -1);
transform: scale(1, -1);
}
.bs-sidebar .navbar-toggler.collapsed span {
-moz-transform: scale(1, 1);
-webkit-transform: scale(1, 1);
-o-transform: scale(1, 1);
-ms-transform: scale(1, 1);
transform: scale(1, 1);
}
/* First level of nav */
.bs-sidebar > .navbar-collapse > .nav {
padding-top: 10px;
padding-bottom: 10px;
border-radius: 5px;
width: 100%;
}
/* All levels of nav */
.bs-sidebar .nav > li > a {
display: block;
padding: 5px 20px;
z-index: 1;
}
.bs-sidebar .nav > li > a:hover,
.bs-sidebar .nav > li > a:focus {
text-decoration: none;
border-right: 1px solid;
}
.bs-sidebar .nav > li > a.active,
.bs-sidebar .nav > li > a.active:hover,
.bs-sidebar .nav > li > a.active:focus {
font-weight: bold;
background-color: transparent;
border-right: 1px solid;
}
.bs-sidebar .nav .nav .nav {
margin-left: 1em;
}
.bs-sidebar .nav > li > a {
font-weight: bold;
}
.bs-sidebar .nav .nav > li > a {
font-weight: normal;
}
.headerlink {
display: none;
padding-left: .5em;
}
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .headerlink, h5:hover .headerlink, h6:hover .headerlink{
display:inline-block;
}
@media (max-width: 991.98px) {
.navbar-collapse.show {
overflow-y: auto;
max-height: calc(100vh - 3.5rem);
}
}
.dropdown-item.open {
color: #fff;
background-color: #2A9FD6;
}
.dropdown-submenu > .dropdown-menu {
margin: 0 0 0 1.5rem;
padding: 0;
border-width: 0;
}
.dropdown-submenu > a::after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #999999;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover > a::after {
border-left-color: #fff;
}
@media (min-width: 992px) {
.dropdown-menu {
overflow-y: auto;
max-height: calc(100vh - 3.5rem);
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu > .dropdown-menu {
position: fixed !important;
margin-top: -9px;
margin-left: -2px;
border-width: 1px;
padding: 0.5rem 0;
}
}

12
css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

4
css/font-awesome.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,19 +0,0 @@
# branching
---
## Branch to env mapping
* [Env branch mapping](https://www.wearefine.com/mingle/env-branching-with-git/)
* [gitlab flow](https://docs.gitlab.com/ee/workflow/gitlab_flow.html)
* [oneflow](http://endoflineblog.com/oneflow-a-git-branching-model-and-workflow) (gitflow with one instead of two long-living branches)
### branch -> env
* prod -> prod
* mo -> mo
* qa -> qa
* **master** -> dev (feature branches are created from master)
* specific tagged commits can be deployed from master to any of the dev or qa envs
Env configs can be generated with a combination of env vars and other source-controlled files

View File

@ -1,124 +0,0 @@
# common commands
These are commands and options that I use frequently. See the linked documentation for more options and information.
---
## [add](https://git-scm.com/docs/git-add)
> `git add [--all] [<files>]`
Add files from the working tree to the staging area. [`commit`](#commit) operates on the staging area.
Try interactive staging: `git add -i`
## [branch](https://git-scm.com/docs/git-commit)
> `git branch [<branch>]`
Show branches and create new ones.
## [checkout](https://git-scm.com/docs/git-checkout)
> `git checkout [<branch>]`
Switch branches or restore working tree files.
The `-b` switch creates the branch if it doesn't exist and switches to it.
## [clone](https://git-scm.com/docs/git-clone)
> `git clone [<remote_url>] [directory_to_clone_into]`
Download a copy of a remote repository from a server.
## [commit](https://git-scm.com/docs/git-commit)
> `git commit [-a] [-m "commit message here"]`
Create a snapshot of the staging area. Record staged changes.
The `-a` switch will add all modified and deleted files (will not pick up new files that have been added to the repo) to the staging area before committing.
## [diff](https://git-scm.com/docs/git-diff)
> `git diff [<from_path-spec>]..[<to_path-spec>]`
Show changes by line. With no arguments, `diff` shows all unstaged changes.
Other uses would be comparing changes between branches or between a range of commits (referred to by their hashes, which you can see with [`log`](#log)).
## [fetch](https://git-scm.com/docs/git-fetch)
> `git fetch [<repository> [<refspec>]]`
Download objects and refs from another (usually remote) repository.
## [init](https://git-scm.com/docs/git-init)
> `git init [--bare] [--shared] [<directory>]`
Create an empty repo or reinitialize an existing one.
## [log](https://git-scm.com/docs/git-log)
> `git log [<revision range>]`
Show commit logs. There are a lot of options here. Check out the documentation.
Here are some of the log options that I use often. Some tips were taken from [git-tips](https://github.com/git-tips/tips)
All commits since forking from master
* `git log --no-merges --stat --reverse master..`
Visualize the history as a tree
* `git log --pretty=oneline --graph --decorate --all`
![pretty oneline](img/pretty-oneline.png)
List changes specific to a certain file
* `git log --follow -p -- <file_path>`
## [merge](https://git-scm.com/docs/git-merge)
> `git merge [<branch>]`
Join two or more development histories together.
`merge` incorporates changes from the named commits provided as arguments into the current branch.
Sometimes you will have changed the same line as someone else. This will result in a merge conflict. Some GUI clients have tools to help resolve merge conflicts, but it is good to know how to do it manually.
```
Here are lines that are either unchanged from the common
ancestor, or cleanly resolved because only one side changed.
<<<<<<< yours:sample.txt
Conflict resolution is hard;
let's go shopping.
=======
Git makes conflict resolution easy.
>>>>>>> theirs:sample.txt
And here is another line that is cleanly resolved or unmodified.
```
* This is what you will see as the result of a merge conflict. Simply keep the lines you would like, remove the conflict markers, and commit the result.
See the documentation for more info on how to resolve merge conflicts.
## [pull](https://git-scm.com/docs/git-pull)
> `git pull [--rebase] [--ff] [--no-ff] [<remote name>] [<branch name>]`
`pull` is a synonym for [`fetch`](#fetch) followed immediately by a [`merge`](#merge). It's a nice shortcut for that.
Use the `--rebase` option when you haven't made any changes and want to get the latest changes that others have pushed to the remote.
To sync with remote and overwrite local changes:
> `git fetch origin && git reset --hard origin/master && git clean -f -d`
## [push](https://git-scm.com/docs/git-push)
> `git push [-u] [<remote name>] [<branch name>]`
The `-u` option will set the following branch and remote to the default upstream. This means you can simply do `git pull` without the [refspec](glossary.md#refspec).

View File

@ -1,106 +0,0 @@
# glossary
> [source (git-scm.com)](https://git-scm.com/book/en/v2) (unless otherwise noted)
---
## [branch](https://git-scm.com/book/en/v1/Git-Branching-What-a-Branch-Is)
To really understand the way Git does branching, we need to take a step back and examine how Git stores its data. As you may remember from Chapter 1, Git doesnt store data as a series of changesets or deltas, but instead as a series of snapshots.
Running [`git commit`](common_commands.md#commit) checksums all project directories and stores them as tree objects in the Git repository. Git then creates a commit object that has the metadata and a pointer to the root project tree object so it can re-create that snapshot when needed.
A branch in Git is simply a lightweight movable pointer to one of these commits. The default branch name in Git is master. As you initially make commits, youre given a master branch that points to the last commit you made. Every time you commit, it moves forward automatically.
## [checkout](common_commands.md#checkout)
Checking out is the operation of switching the working tree to the state at a given snapshot, which is usually the HEAD of another branch.
## commit
A commit is a snapshot of all tracked files in the repo.
## directory
Also known as a folder.
## dirty
> [source](https://stackoverflow.com/questions/20642980/does-git-dirty-mean-files-not-staged-or-not-committed-glossary-conflict)
The "right" definition is, I think, that your tree is "clean" if there are no changes to commit and no changes between "tree staged for commit" (contents of index) and "work directory". However, it's reasonable to ask separately whether the index is clean (i.e., there is nothing staged for commit) and/or the work-tree is clean (unchanged) with respect to "the staging area" or "the HEAD commit".
## distributed version control system
A Distributed Version Control System (DVCS) differs from traditional VCS systems in that every user has a copy of the entire repo, including the history and all branches.
A connection to a central server is not required to work on a project. Changes and conflicts can be resolved later when the diverging histories are [`merge`](common_commands.md#merge)d later on.
## [gitignore](https://git-scm.com/docs/gitignore)
Specifies intentionally untracked files to ignore.
A `.gitignore` file in the root of the repository contains a list of patterns that should not be tracked.
See the documentation for more information on ignore patterns.
Tracked files that you would like to ignore can be deleted with `git rm --cached .` and then re-added with `git add .`
## [hash](https://git-scm.com/docs/gitglossary#def_SHA1)
The unique identifier of an object. The object name is usually represented by a 40 character hexadecimal string. Also colloquially called SHA-1.
## master
Master is the name given to the default branch of a repository.
Whenever you create a Git repository, a branch named "master" is created, and becomes the active branch. In most cases, this contains the local development, though that is purely by convention and is not required.
## origin
Origin is the name given to the default remote. It is set automatically when using [`git clone`](common_commands.md#clone), and recommended when setting up the remote for an existing repo.
## [pathspec](https://git-scm.com/docs/gitglossary#gitglossary-aiddefpathspecapathspec)
Pattern used to limit paths in Git commands.
Pathspecs are used on the command line of `git ls-files`, `git ls-tree`, `git add`, `git grep`, `git diff`, `git checkout`, and many other commands to limit the scope of operations to some subset of the tree or worktree. See the documentation of each command for whether paths are relative to the current directory or toplevel. The pathspec syntax is as follows:
* any path matches itself
* the pathspec up to the last slash represents a directory prefix. The scope of that pathspec is limited to that subtree.
* the rest of the pathspec is a pattern for the remainder of the pathname. Paths relative to the directory prefix will be matched against that pattern using fnmatch(3); in particular, * and ? can match directory separators.
For example, Documentation/*.jpg will match all .jpg files in the Documentation subtree, including Documentation/chapter_1/figure_1.jpg.
A pathspec that begins with a colon : has special meaning. In the short form, the leading colon : is followed by zero or more "magic signature" letters (which optionally is terminated by another colon :), and the remainder is the pattern to match against the path. The "magic signature" consists of ASCII symbols that are neither alphanumeric, glob, regex special characters nor colon. The optional colon that terminates the "magic signature" can be omitted if the pattern begins with a character that does not belong to "magic signature" symbol set and is not a colon.
In the long form, the leading colon : is followed by a open parenthesis (, a comma-separated list of zero or more "magic words", and a close parentheses ), and the remainder is the pattern to match against the path.
A pathspec with only a colon means "there is no pathspec". This form should not be combined with other pathspec.
## [refspec](https://git-scm.com/docs/gitglossary#gitglossary-aiddefrefaref)
A name that begins with refs/ (e.g. refs/heads/master) that points to an object name or another ref (the latter is called a symbolic ref). For convenience, a ref can sometimes be abbreviated when used as an argument to a Git command; see gitrevisions[7] for details. Refs are stored in the repository.
The ref namespace is hierarchical. Different subhierarchies are used for different purposes (e.g. the refs/heads/ hierarchy is used to represent local branches).
There are a few special-purpose refs that do not begin with refs/. The most notable example is HEAD.
## [remote](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)
Remote repositories are versions of your project that are hosted on the Internet or network somewhere. You can have several of them, each of which generally is either read-only or read/write for you. Collaborating with others involves managing these remote repositories and pushing and pulling data to and from them when you need to share work.
## [repository](https://git-scm.com/docs/gitglossary#def_repository)
A collection of refs together with an object database containing all objects which are reachable from the refs, possibly accompanied by meta data from one or more porcelains. A repository can share an object database with other repositories via alternates mechanism.
## [staging area](https://softwareengineering.stackexchange.com/questions/119782/what-does-stage-mean-in-git)
source: [stack exchange](https://softwareengineering.stackexchange.com/questions/119782/what-does-stage-mean-in-git)
To stage a file is simply to prepare it finely for a commit. Git, with its index allows you to commit only certain parts of the changes you've done since the last commit. Say you're working on two features - one is finished, and one still needs some work done. You'd like to make a commit and go home (5 o'clock, finally!) but wouldn't like to commit the parts of the second feature, which is not done yet. You stage the parts you know belong to the first feature, and commit. Now your commit is your project with the first feature done, while the second is still in work-in-progress in your working directory.
## [working tree](https://git-scm.com/docs/gitglossary#gitglossary-aiddefworkingtreeaworkingtree)
The tree of actual checked out files. The working tree normally contains the contents of the HEAD commits tree, plus any local changes that you have made but not yet committed.

View File

@ -1,105 +0,0 @@
# learngit
This is a compilation of notes, tips and a getting started guide to [`git`](https://git-scm.com). Please feel free to open a pull request or fork it for yourself!
---
# here we go!
This is not meant to be a complete guide to git. Just some notes that I've gathered over the years of using git that might be helpful to share with others.
## getting set up
1. Download [`git`](https://git-scm.com) and install it.
* Some OSes/distros have `git` available through a package manager like `brew`, `apt`, or `pacman`. That will be the easiest option.
1. Windows: open git bash (or any command prompt if you chose to install git system-wide).
All other systems: open a terminal of your choice.
1. Make sure that the install worked correctly by typing `git --version`
1. Configure git with your name and email address:
* `git config --global user.name "Your Name Here"`
* `git config --global user.email "name@domain.tld"`
You're ready to `git` gud!
![git gud](img/gitgud.jpeg)
## making your first repo
1. Create a new, empty folder ([directory](glossary.md#directory) in git and unix speak)
* the command to make a new folder is `mkdir <directory_name>`
1. Open or move to that folder in a command prompt that has git (look for git bash in the start menu if you're having trouble with this one)
* the command to move between directories is `cd <directory_name>`
1. Once you're in that directory, execute `git init`. this command creates a `.git` folder inside the current folder, which is where `git` stores all the information and history for the repo.
1. Create and edit some files
* for example: `echo "foo bar" >> foobar.txt`
1. Check `git status` you should see something like this:
![status of new repo](img/new-repo-status.png)
* at this point, our [working tree](glossary.md#working-tree) is ["dirty"](glossary.md#dirty), meaning that there are unsaved changes in the directory.
1. At this point, you need to add the changes to the [staging area](glossary.md#staging-area) with the `git add` command
* you can add individual files by name (`git add foobar.txt`) or all changes to the working tree with the command option `--all`
1. Once the files are staged, you are now ready to [`commit`](common_commands.md#commit) the changes. every commit requires a message, which can be specified with the `-m` option. if you don't give a message with the [`commit`](common_commands.md#commit) command, `git` will open your file editor and ask you to enter one.
![add and commit changes](img/add-and-commit.png)
Now you have a repo with one commit in it!
## syncing your changes with others
Now we get to have some real fun. The whole point of a distributed version control system is to allow many people to be working on the same code at once.
There are many ways to collaborate on a `git` repo. The simplest way to share a repo is to use the `--bare` option with the [`init`](common_commands.md#init) command.
> Bare repos are generally stored on a server that all users have SSH access to: once the repo is created on the server, each person can [`clone`](common_commands.md#clone) a copy to their local machine like this: `git clone user@servername:path/to/repo`
Otherwise, there are dozens of git hosting options, the most popular of which is [github](https://github.com), which hosts the majority of all open source projects.
Another cool option is [gitlab](https://gitlab.com). They offer unlimited private repos in addition to public ones.
Let's take a look at syncing your repo with github (or any other git hosting location - just swap out the URLs).
1. [Create the repo](https://github.com/new) (this assumes you're using GitHub)
1. Set up the [`remote`](glossary.md#remote)s
* This depends on whether you have already created the repository locally. once you have created the repo on github, it will display some tips for which commands to use
* For an existing repo: `git remote add origin git@github.com:username/reponame` OR `git remote add origin https://github.com/username/reponame` depending on your [SSH key setup](ssh_setup)
* If the repo doesn't exist yet, [`clone`](common_commands.md#clone) the repo like this: `git clone git@github.com:username/reponame`
* A repo can have and use more than one remote. you can see the current remotes with this command: `git remote -v`
1. Before you can sync your changes, there needs to be at least one commit in the repo (not a problem for pre-existing repos). Create one now if you haven't.
1. Now you can [`push`](common_commands.md#push) your commit history to the remote repo! use this command: `git push origin --all` to push all branches and commits to the remote (assuming that the remote is named `origin`)
To get changes that have other people have pushed the the repo while you were away, use the [`fetch`](common_commands.md#fetch) and [`merge`](common_commands.md#merge) commands. since this is such a common operation, [`pull`](common_commands.md#pull) was created as a shortcut for `git fetch` immediately followed by `git merge`.
If you haven't made any changes since the last time you `pull`ed the latest changes, it's usually a good idea to [`rebase`](common_commands.md#pull). This will replay all of the work that has been done on top of the current repo state, avoiding extra merge commits in the repo history. Just use `git pull --rebase`.
---
## external resources
So you want to learn more?
Here are some more resources!
### articles and documentation
* [git flight rules](https://github.com/k88hudson/git-flight-rules)
* [progit book](https://git-scm.com/book/en/v2)
* [github interactive tutorial](https://try.github.io)
* [learn enough git to be dangerous](https://www.learnenough.com/git-tutorial)
* [atlassian git tutorials](https://www.atlassian.com/git/tutorials)
* [github documentation](https://help.github.com)
### tools and apps
* [sourcetree app](https://sourcetreeapp.com) (a visual GUI tool for working with git repos: great for people who don't feel quite at home on the command line)
* [github desktop](https://desktop.github.com) (an alternate GUI by github)
---
## contact me
Shoot me a message somewhere on the interwebz
* [email](mailto:ben@tilde.team)
* [my site](https://tilde.team/~ben/)
* [github](https://github.com/benharri)
* irc (`ben` on [tilde.chat](https://tilde.chat/) and [libera.chat](https://libera.chat/))
Thanks for checking out my git guide!

View File

@ -1,22 +0,0 @@
# ssh key setup
---
Using SSH authentication for communicating with remote repos is generally easier than using https. Sometimes it's required for certain repos or by rules set at the hosting level.
Here's how to get set up with SSH keys
1. Create an SSH public/private key pair (skip this if you already have one!)
1. open git bash (or any other terminal that has git available)
1. type `ssh-keygen` and press enter
* press enter to answer each of the following questions with the default answers
1. as long as you saved your SSH key to the default location, enter the following command: `cat ~/.ssh/id_rsa.pub`
1. highlight and copy the output (starts with `ssh-rsa` and ends with `username@computer_name`)
1. navigate to your SSH key settings on your git hosting and add your key to your profile
1. Clone or add the remote to an existing repo per the instructions on the project page using the ssh URL scheme (instead of `https://`)
* `git clone git@gitawse1.hagerty.com:<username>/<project>`
* `git remote add origin git@gitawse1.hagerty.com:<username>/<project>`
1. Profit??$?
> You should now be able to use SSH URLs for connections between your terminal and the remote that you copied the key to

BIN
fonts/FontAwesome.otf Normal file

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

308
glossary/index.html Normal file
View File

@ -0,0 +1,308 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../img/favicon.ico">
<title>glossary - learngit</title>
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/font-awesome.min.css" rel="stylesheet">
<link href="../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/darcula.min.css">
<script src="../js/jquery-1.10.2.min.js" defer></script>
<script src="../js/bootstrap.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="..">learngit</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="navitem">
<a href=".." class="nav-link">learngit</a>
</li>
<li class="navitem">
<a href="../branching_strategies/" class="nav-link">branching</a>
</li>
<li class="navitem">
<a href="../common_commands/" class="nav-link">common commands</a>
</li>
<li class="navitem active">
<a href="./" class="nav-link">glossary</a>
</li>
<li class="navitem">
<a href="../ssh_setup/" class="nav-link">ssh key setup</a>
</li>
</ul>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="nav-item">
<a rel="prev" href="../common_commands/" class="nav-link">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li class="nav-item">
<a rel="next" href="../ssh_setup/" class="nav-link">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
<li class="nav-item">
<a href="https://github.com/benharri/learngit/blob/master/docs/glossary.md" class="nav-link"><i class="fa fa-github"></i> Edit on GitHub</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
<div class="navbar-header">
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
<span class="fa fa-angle-down"></span>
</button>
</div>
<div id="toc-collapse" class="navbar-collapse collapse card bg-light">
<ul class="nav flex-column">
<li class="nav-item" data-level="1"><a href="#glossary" class="nav-link">glossary</a>
<ul class="nav flex-column">
<li class="nav-item" data-level="2"><a href="#branch" class="nav-link">branch</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#checkout" class="nav-link">checkout</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#commit" class="nav-link">commit</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#directory" class="nav-link">directory</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#dirty" class="nav-link">dirty</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#distributed-version-control-system" class="nav-link">distributed version control system</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#gitignore" class="nav-link">gitignore</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#hash" class="nav-link">hash</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#master" class="nav-link">master</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#origin" class="nav-link">origin</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#pathspec" class="nav-link">pathspec</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#refspec" class="nav-link">refspec</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#remote" class="nav-link">remote</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#repository" class="nav-link">repository</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#staging-area" class="nav-link">staging area</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#working-tree" class="nav-link">working tree</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div></div>
<div class="col-md-9" role="main">
<h1 id="glossary">glossary<a class="headerlink" href="#glossary" title="Permanent link">&para;</a></h1>
<blockquote>
<p><a href="https://git-scm.com/book/en/v2">source (git-scm.com)</a> (unless otherwise noted)</p>
</blockquote>
<hr />
<h2 id="branch"><a href="https://git-scm.com/book/en/v1/Git-Branching-What-a-Branch-Is">branch</a><a class="headerlink" href="#branch" title="Permanent link">&para;</a></h2>
<p>To really understand the way Git does branching, we need to take a step back and examine how Git stores its data. As you may remember from Chapter 1, Git doesnt store data as a series of changesets or deltas, but instead as a series of snapshots.</p>
<p>Running <a href="../common_commands/#commit"><code>git commit</code></a> checksums all project directories and stores them as tree objects in the Git repository. Git then creates a commit object that has the metadata and a pointer to the root project tree object so it can re-create that snapshot when needed.</p>
<p>A branch in Git is simply a lightweight movable pointer to one of these commits. The default branch name in Git is master. As you initially make commits, youre given a master branch that points to the last commit you made. Every time you commit, it moves forward automatically.</p>
<h2 id="checkout"><a href="../common_commands/#checkout">checkout</a><a class="headerlink" href="#checkout" title="Permanent link">&para;</a></h2>
<p>Checking out is the operation of switching the working tree to the state at a given snapshot, which is usually the HEAD of another branch.</p>
<h2 id="commit">commit<a class="headerlink" href="#commit" title="Permanent link">&para;</a></h2>
<p>A commit is a snapshot of all tracked files in the repo.</p>
<h2 id="directory">directory<a class="headerlink" href="#directory" title="Permanent link">&para;</a></h2>
<p>Also known as a folder.</p>
<h2 id="dirty">dirty<a class="headerlink" href="#dirty" title="Permanent link">&para;</a></h2>
<blockquote>
<p><a href="https://stackoverflow.com/questions/20642980/does-git-dirty-mean-files-not-staged-or-not-committed-glossary-conflict">source</a></p>
</blockquote>
<p>The "right" definition is, I think, that your tree is "clean" if there are no changes to commit and no changes between "tree staged for commit" (contents of index) and "work directory". However, it's reasonable to ask separately whether the index is clean (i.e., there is nothing staged for commit) and/or the work-tree is clean (unchanged) with respect to "the staging area" or "the HEAD commit".</p>
<h2 id="distributed-version-control-system">distributed version control system<a class="headerlink" href="#distributed-version-control-system" title="Permanent link">&para;</a></h2>
<p>A Distributed Version Control System (DVCS) differs from traditional VCS systems in that every user has a copy of the entire repo, including the history and all branches.</p>
<p>A connection to a central server is not required to work on a project. Changes and conflicts can be resolved later when the diverging histories are <a href="../common_commands/#merge"><code>merge</code></a>d later on.</p>
<h2 id="gitignore"><a href="https://git-scm.com/docs/gitignore">gitignore</a><a class="headerlink" href="#gitignore" title="Permanent link">&para;</a></h2>
<p>Specifies intentionally untracked files to ignore.</p>
<p>A <code>.gitignore</code> file in the root of the repository contains a list of patterns that should not be tracked.</p>
<p>See the documentation for more information on ignore patterns.</p>
<p>Tracked files that you would like to ignore can be deleted with <code>git rm --cached .</code> and then re-added with <code>git add .</code></p>
<h2 id="hash"><a href="https://git-scm.com/docs/gitglossary#def_SHA1">hash</a><a class="headerlink" href="#hash" title="Permanent link">&para;</a></h2>
<p>The unique identifier of an object. The object name is usually represented by a 40 character hexadecimal string. Also colloquially called SHA-1.</p>
<h2 id="master">master<a class="headerlink" href="#master" title="Permanent link">&para;</a></h2>
<p>Master is the name given to the default branch of a repository.</p>
<p>Whenever you create a Git repository, a branch named "master" is created, and becomes the active branch. In most cases, this contains the local development, though that is purely by convention and is not required.</p>
<h2 id="origin">origin<a class="headerlink" href="#origin" title="Permanent link">&para;</a></h2>
<p>Origin is the name given to the default remote. It is set automatically when using <a href="../common_commands/#clone"><code>git clone</code></a>, and recommended when setting up the remote for an existing repo.</p>
<h2 id="pathspec"><a href="https://git-scm.com/docs/gitglossary#gitglossary-aiddefpathspecapathspec">pathspec</a><a class="headerlink" href="#pathspec" title="Permanent link">&para;</a></h2>
<p>Pattern used to limit paths in Git commands.</p>
<p>Pathspecs are used on the command line of <code>git ls-files</code>, <code>git ls-tree</code>, <code>git add</code>, <code>git grep</code>, <code>git diff</code>, <code>git checkout</code>, and many other commands to limit the scope of operations to some subset of the tree or worktree. See the documentation of each command for whether paths are relative to the current directory or toplevel. The pathspec syntax is as follows:</p>
<ul>
<li>
<p>any path matches itself</p>
</li>
<li>
<p>the pathspec up to the last slash represents a directory prefix. The scope of that pathspec is limited to that subtree.</p>
</li>
<li>
<p>the rest of the pathspec is a pattern for the remainder of the pathname. Paths relative to the directory prefix will be matched against that pattern using fnmatch(3); in particular, * and ? can match directory separators.</p>
</li>
</ul>
<p>For example, Documentation/*.jpg will match all .jpg files in the Documentation subtree, including Documentation/chapter_1/figure_1.jpg.</p>
<p>A pathspec that begins with a colon : has special meaning. In the short form, the leading colon : is followed by zero or more "magic signature" letters (which optionally is terminated by another colon :), and the remainder is the pattern to match against the path. The "magic signature" consists of ASCII symbols that are neither alphanumeric, glob, regex special characters nor colon. The optional colon that terminates the "magic signature" can be omitted if the pattern begins with a character that does not belong to "magic signature" symbol set and is not a colon.</p>
<p>In the long form, the leading colon : is followed by a open parenthesis (, a comma-separated list of zero or more "magic words", and a close parentheses ), and the remainder is the pattern to match against the path.</p>
<p>A pathspec with only a colon means "there is no pathspec". This form should not be combined with other pathspec.</p>
<h2 id="refspec"><a href="https://git-scm.com/docs/gitglossary#gitglossary-aiddefrefaref">refspec</a><a class="headerlink" href="#refspec" title="Permanent link">&para;</a></h2>
<p>A name that begins with refs/ (e.g. refs/heads/master) that points to an object name or another ref (the latter is called a symbolic ref). For convenience, a ref can sometimes be abbreviated when used as an argument to a Git command; see gitrevisions[7] for details. Refs are stored in the repository.</p>
<p>The ref namespace is hierarchical. Different subhierarchies are used for different purposes (e.g. the refs/heads/ hierarchy is used to represent local branches).</p>
<p>There are a few special-purpose refs that do not begin with refs/. The most notable example is HEAD.</p>
<h2 id="remote"><a href="https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes">remote</a><a class="headerlink" href="#remote" title="Permanent link">&para;</a></h2>
<p>Remote repositories are versions of your project that are hosted on the Internet or network somewhere. You can have several of them, each of which generally is either read-only or read/write for you. Collaborating with others involves managing these remote repositories and pushing and pulling data to and from them when you need to share work.</p>
<h2 id="repository"><a href="https://git-scm.com/docs/gitglossary#def_repository">repository</a><a class="headerlink" href="#repository" title="Permanent link">&para;</a></h2>
<p>A collection of refs together with an object database containing all objects which are reachable from the refs, possibly accompanied by meta data from one or more porcelains. A repository can share an object database with other repositories via alternates mechanism.</p>
<h2 id="staging-area"><a href="https://softwareengineering.stackexchange.com/questions/119782/what-does-stage-mean-in-git">staging area</a><a class="headerlink" href="#staging-area" title="Permanent link">&para;</a></h2>
<p>source: <a href="https://softwareengineering.stackexchange.com/questions/119782/what-does-stage-mean-in-git">stack exchange</a></p>
<p>To stage a file is simply to prepare it finely for a commit. Git, with its index allows you to commit only certain parts of the changes you've done since the last commit. Say you're working on two features - one is finished, and one still needs some work done. You'd like to make a commit and go home (5 o'clock, finally!) but wouldn't like to commit the parts of the second feature, which is not done yet. You stage the parts you know belong to the first feature, and commit. Now your commit is your project with the first feature done, while the second is still in work-in-progress in your working directory.</p>
<h2 id="working-tree"><a href="https://git-scm.com/docs/gitglossary#gitglossary-aiddefworkingtreeaworkingtree">working tree</a><a class="headerlink" href="#working-tree" title="Permanent link">&para;</a></h2>
<p>The tree of actual checked out files. The working tree normally contains the contents of the HEAD commits tree, plus any local changes that you have made but not yet committed.</p></div>
</div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../js/base.js" defer></script>
<script src="../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>

View File

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

BIN
img/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
img/grid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 159 KiB

309
index.html Normal file
View File

@ -0,0 +1,309 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="None">
<link rel="shortcut icon" href="img/favicon.ico">
<title>learngit</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/darcula.min.css">
<script src="js/jquery-1.10.2.min.js" defer></script>
<script src="js/bootstrap.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="homepage">
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href=".">learngit</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="navitem active">
<a href="." class="nav-link">learngit</a>
</li>
<li class="navitem">
<a href="branching_strategies/" class="nav-link">branching</a>
</li>
<li class="navitem">
<a href="common_commands/" class="nav-link">common commands</a>
</li>
<li class="navitem">
<a href="glossary/" class="nav-link">glossary</a>
</li>
<li class="navitem">
<a href="ssh_setup/" class="nav-link">ssh key setup</a>
</li>
</ul>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="nav-item">
<a rel="prev" class="nav-link disabled">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li class="nav-item">
<a rel="next" href="branching_strategies/" class="nav-link">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
<li class="nav-item">
<a href="https://github.com/benharri/learngit/blob/master/docs/index.md" class="nav-link"><i class="fa fa-github"></i> Edit on GitHub</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
<div class="navbar-header">
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
<span class="fa fa-angle-down"></span>
</button>
</div>
<div id="toc-collapse" class="navbar-collapse collapse card bg-light">
<ul class="nav flex-column">
<li class="nav-item" data-level="1"><a href="#learngit" class="nav-link">learngit</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#here-we-go" class="nav-link">here we go!</a>
<ul class="nav flex-column">
<li class="nav-item" data-level="2"><a href="#getting-set-up" class="nav-link">getting set up</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#making-your-first-repo" class="nav-link">making your first repo</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#syncing-your-changes-with-others" class="nav-link">syncing your changes with others</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#external-resources" class="nav-link">external resources</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#contact-me" class="nav-link">contact me</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div></div>
<div class="col-md-9" role="main">
<h1 id="learngit">learngit<a class="headerlink" href="#learngit" title="Permanent link">&para;</a></h1>
<p>This is a compilation of notes, tips and a getting started guide to <a href="https://git-scm.com"><code>git</code></a>. Please feel free to open a pull request or fork it for yourself!</p>
<hr />
<h1 id="here-we-go">here we go!<a class="headerlink" href="#here-we-go" title="Permanent link">&para;</a></h1>
<p>This is not meant to be a complete guide to git. Just some notes that I've gathered over the years of using git that might be helpful to share with others.</p>
<h2 id="getting-set-up">getting set up<a class="headerlink" href="#getting-set-up" title="Permanent link">&para;</a></h2>
<ol>
<li>Download <a href="https://git-scm.com"><code>git</code></a> and install it.<ul>
<li>Some OSes/distros have <code>git</code> available through a package manager like <code>brew</code>, <code>apt</code>, or <code>pacman</code>. That will be the easiest option.</li>
</ul>
</li>
<li>Windows: open git bash (or any command prompt if you chose to install git system-wide).
All other systems: open a terminal of your choice.</li>
<li>Make sure that the install worked correctly by typing <code>git --version</code></li>
<li>Configure git with your name and email address:<ul>
<li><code>git config --global user.name "Your Name Here"</code></li>
<li><code>git config --global user.email "name@domain.tld"</code></li>
</ul>
</li>
</ol>
<p>You're ready to <code>git</code> gud!</p>
<p><img alt="git gud" src="img/gitgud.jpeg" /></p>
<h2 id="making-your-first-repo">making your first repo<a class="headerlink" href="#making-your-first-repo" title="Permanent link">&para;</a></h2>
<ol>
<li>Create a new, empty folder (<a href="glossary/#directory">directory</a> in git and unix speak)<ul>
<li>the command to make a new folder is <code>mkdir &lt;directory_name&gt;</code></li>
</ul>
</li>
<li>Open or move to that folder in a command prompt that has git (look for git bash in the start menu if you're having trouble with this one)<ul>
<li>the command to move between directories is <code>cd &lt;directory_name&gt;</code></li>
</ul>
</li>
<li>Once you're in that directory, execute <code>git init</code>. this command creates a <code>.git</code> folder inside the current folder, which is where <code>git</code> stores all the information and history for the repo.</li>
<li>Create and edit some files<ul>
<li>for example: <code>echo "foo bar" &gt;&gt; foobar.txt</code></li>
</ul>
</li>
<li>Check <code>git status</code> you should see something like this:
<img alt="status of new repo" src="img/new-repo-status.png" /><ul>
<li>at this point, our <a href="glossary/#working-tree">working tree</a> is <a href="glossary/#dirty">"dirty"</a>, meaning that there are unsaved changes in the directory.</li>
</ul>
</li>
<li>At this point, you need to add the changes to the <a href="glossary/#staging-area">staging area</a> with the <code>git add</code> command<ul>
<li>you can add individual files by name (<code>git add foobar.txt</code>) or all changes to the working tree with the command option <code>--all</code></li>
</ul>
</li>
<li>Once the files are staged, you are now ready to <a href="common_commands/#commit"><code>commit</code></a> the changes. every commit requires a message, which can be specified with the <code>-m</code> option. if you don't give a message with the <a href="common_commands/#commit"><code>commit</code></a> command, <code>git</code> will open your file editor and ask you to enter one.
<img alt="add and commit changes" src="img/add-and-commit.png" /></li>
</ol>
<p>Now you have a repo with one commit in it!</p>
<h2 id="syncing-your-changes-with-others">syncing your changes with others<a class="headerlink" href="#syncing-your-changes-with-others" title="Permanent link">&para;</a></h2>
<p>Now we get to have some real fun. The whole point of a distributed version control system is to allow many people to be working on the same code at once.</p>
<p>There are many ways to collaborate on a <code>git</code> repo. The simplest way to share a repo is to use the <code>--bare</code> option with the <a href="common_commands/#init"><code>init</code></a> command.</p>
<blockquote>
<p>Bare repos are generally stored on a server that all users have SSH access to: once the repo is created on the server, each person can <a href="common_commands/#clone"><code>clone</code></a> a copy to their local machine like this: <code>git clone user@servername:path/to/repo</code></p>
</blockquote>
<p>Otherwise, there are dozens of git hosting options, the most popular of which is <a href="https://github.com">github</a>, which hosts the majority of all open source projects.</p>
<p>Another cool option is <a href="https://gitlab.com">gitlab</a>. They offer unlimited private repos in addition to public ones.</p>
<p>Let's take a look at syncing your repo with github (or any other git hosting location - just swap out the URLs).</p>
<ol>
<li><a href="https://github.com/new">Create the repo</a> (this assumes you're using GitHub)</li>
<li>Set up the <a href="glossary/#remote"><code>remote</code></a>s<ul>
<li>This depends on whether you have already created the repository locally. once you have created the repo on github, it will display some tips for which commands to use</li>
<li>For an existing repo: <code>git remote add origin git@github.com:username/reponame</code> OR <code>git remote add origin https://github.com/username/reponame</code> depending on your <a href="ssh_setup">SSH key setup</a></li>
<li>If the repo doesn't exist yet, <a href="common_commands/#clone"><code>clone</code></a> the repo like this: <code>git clone git@github.com:username/reponame</code></li>
<li>A repo can have and use more than one remote. you can see the current remotes with this command: <code>git remote -v</code></li>
</ul>
</li>
<li>Before you can sync your changes, there needs to be at least one commit in the repo (not a problem for pre-existing repos). Create one now if you haven't.</li>
<li>Now you can <a href="common_commands/#push"><code>push</code></a> your commit history to the remote repo! use this command: <code>git push origin --all</code> to push all branches and commits to the remote (assuming that the remote is named <code>origin</code>)</li>
</ol>
<p>To get changes that have other people have pushed the the repo while you were away, use the <a href="common_commands/#fetch"><code>fetch</code></a> and <a href="common_commands/#merge"><code>merge</code></a> commands. since this is such a common operation, <a href="common_commands/#pull"><code>pull</code></a> was created as a shortcut for <code>git fetch</code> immediately followed by <code>git merge</code>.</p>
<p>If you haven't made any changes since the last time you <code>pull</code>ed the latest changes, it's usually a good idea to <a href="common_commands/#pull"><code>rebase</code></a>. This will replay all of the work that has been done on top of the current repo state, avoiding extra merge commits in the repo history. Just use <code>git pull --rebase</code>.</p>
<hr />
<h2 id="external-resources">external resources<a class="headerlink" href="#external-resources" title="Permanent link">&para;</a></h2>
<p>So you want to learn more?
Here are some more resources!</p>
<h3 id="articles-and-documentation">articles and documentation<a class="headerlink" href="#articles-and-documentation" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="https://github.com/k88hudson/git-flight-rules">git flight rules</a></li>
<li><a href="https://git-scm.com/book/en/v2">progit book</a></li>
<li><a href="https://try.github.io">github interactive tutorial</a></li>
<li><a href="https://www.learnenough.com/git-tutorial">learn enough git to be dangerous</a></li>
<li><a href="https://www.atlassian.com/git/tutorials">atlassian git tutorials</a></li>
<li><a href="https://help.github.com">github documentation</a></li>
</ul>
<h3 id="tools-and-apps">tools and apps<a class="headerlink" href="#tools-and-apps" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="https://sourcetreeapp.com">sourcetree app</a> (a visual GUI tool for working with git repos: great for people who don't feel quite at home on the command line)</li>
<li><a href="https://desktop.github.com">github desktop</a> (an alternate GUI by github)</li>
</ul>
<hr />
<h2 id="contact-me">contact me<a class="headerlink" href="#contact-me" title="Permanent link">&para;</a></h2>
<p>Shoot me a message somewhere on the interwebz</p>
<ul>
<li><a href="mailto:ben@tilde.team">email</a></li>
<li><a href="https://tilde.team/~ben/">my site</a></li>
<li><a href="https://github.com/benharri">github</a></li>
<li>irc (<code>ben</code> on <a href="https://tilde.chat/">tilde.chat</a> and <a href="https://libera.chat/">libera.chat</a>)</li>
</ul>
<p>Thanks for checking out my git guide!</p></div>
</div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = ".",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="js/base.js" defer></script>
<script src="search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!--
MkDocs version : 1.1.2
Build Date UTC : 2021-07-23 16:47:57.782737+00:00
-->

283
js/base.js Normal file
View File

@ -0,0 +1,283 @@
function getSearchTerm() {
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++) {
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == 'q') {
return sParameterName[1];
}
}
}
function applyTopPadding() {
// Update various absolute positions to match where the main container
// starts. This is necessary for handling multi-line nav headers, since
// that pushes the main container down.
var offset = $('body > .container').offset();
$('html').css('scroll-padding-top', offset.top + 'px');
$('.bs-sidebar.affix').css('top', offset.top + 'px');
}
$(document).ready(function() {
applyTopPadding();
var search_term = getSearchTerm(),
$search_modal = $('#mkdocs_search_modal'),
$keyboard_modal = $('#mkdocs_keyboard_modal');
if (search_term) {
$search_modal.modal();
}
// make sure search input gets autofocus everytime modal opens.
$search_modal.on('shown.bs.modal', function() {
$search_modal.find('#mkdocs-search-query').focus();
});
// Close search modal when result is selected
// The links get added later so listen to parent
$('#mkdocs-search-results').click(function(e) {
if ($(e.target).is('a')) {
$search_modal.modal('hide');
}
});
// Populate keyboard modal with proper Keys
$keyboard_modal.find('.help.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.help];
$keyboard_modal.find('.prev.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.previous];
$keyboard_modal.find('.next.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.next];
$keyboard_modal.find('.search.shortcut kbd')[0].innerHTML = keyCodes[shortcuts.search];
// Keyboard navigation
document.addEventListener("keydown", function(e) {
if ($(e.target).is(':input')) return true;
var key = e.which || e.keyCode || window.event && window.event.keyCode;
var page;
switch (key) {
case shortcuts.next:
page = $('.navbar a[rel="next"]:first').prop('href');
break;
case shortcuts.previous:
page = $('.navbar a[rel="prev"]:first').prop('href');
break;
case shortcuts.search:
e.preventDefault();
$keyboard_modal.modal('hide');
$search_modal.modal('show');
$search_modal.find('#mkdocs-search-query').focus();
break;
case shortcuts.help:
$search_modal.modal('hide');
$keyboard_modal.modal('show');
break;
default: break;
}
if (page) {
$keyboard_modal.modal('hide');
window.location.href = page;
}
});
$('table').addClass('table table-striped table-hover');
// Improve the scrollspy behaviour when users click on a TOC item.
$(".bs-sidenav a").on("click", function() {
var clicked = this;
setTimeout(function() {
var active = $('.nav li.active a');
active = active[active.length - 1];
if (clicked !== active) {
$(active).parent().removeClass("active");
$(clicked).parent().addClass("active");
}
}, 50);
});
function showInnerDropdown(item) {
var popup = $(item).next('.dropdown-menu');
popup.addClass('show');
$(item).addClass('open');
// First, close any sibling dropdowns.
var container = $(item).parent().parent();
container.find('> .dropdown-submenu > a').each(function(i, el) {
if (el !== item) {
hideInnerDropdown(el);
}
});
var popupMargin = 10;
var maxBottom = $(window).height() - popupMargin;
var bounds = item.getBoundingClientRect();
popup.css('left', bounds.right + 'px');
if (bounds.top + popup.height() > maxBottom &&
bounds.top > $(window).height() / 2) {
popup.css({
'top': (bounds.bottom - popup.height()) + 'px',
'max-height': (bounds.bottom - popupMargin) + 'px',
});
} else {
popup.css({
'top': bounds.top + 'px',
'max-height': (maxBottom - bounds.top) + 'px',
});
}
}
function hideInnerDropdown(item) {
var popup = $(item).next('.dropdown-menu');
popup.removeClass('show');
$(item).removeClass('open');
popup.scrollTop(0);
popup.find('.dropdown-menu').scrollTop(0).removeClass('show');
popup.find('.dropdown-submenu > a').removeClass('open');
}
$('.dropdown-submenu > a').on('click', function(e) {
if ($(this).next('.dropdown-menu').hasClass('show')) {
hideInnerDropdown(this);
} else {
showInnerDropdown(this);
}
e.stopPropagation();
e.preventDefault();
});
$('.dropdown-menu').parent().on('hide.bs.dropdown', function(e) {
$(this).find('.dropdown-menu').scrollTop(0);
$(this).find('.dropdown-submenu > a').removeClass('open');
$(this).find('.dropdown-menu .dropdown-menu').removeClass('show');
});
});
$(window).on('resize', applyTopPadding);
$('body').scrollspy({
target: '.bs-sidebar',
offset: 100
});
/* Prevent disabled links from causing a page reload */
$("li.disabled a").click(function() {
event.preventDefault();
});
// See https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
// We only list common keys below. Obscure keys are omitted and their use is discouraged.
var keyCodes = {
8: 'backspace',
9: 'tab',
13: 'enter',
16: 'shift',
17: 'ctrl',
18: 'alt',
19: 'pause/break',
20: 'caps lock',
27: 'escape',
32: 'spacebar',
33: 'page up',
34: 'page down',
35: 'end',
36: 'home',
37: '&larr;',
38: '&uarr;',
39: '&rarr;',
40: '&darr;',
45: 'insert',
46: 'delete',
48: '0',
49: '1',
50: '2',
51: '3',
52: '4',
53: '5',
54: '6',
55: '7',
56: '8',
57: '9',
65: 'a',
66: 'b',
67: 'c',
68: 'd',
69: 'e',
70: 'f',
71: 'g',
72: 'h',
73: 'i',
74: 'j',
75: 'k',
76: 'l',
77: 'm',
78: 'n',
79: 'o',
80: 'p',
81: 'q',
82: 'r',
83: 's',
84: 't',
85: 'u',
86: 'v',
87: 'w',
88: 'x',
89: 'y',
90: 'z',
91: 'Left Windows Key / Left ⌘',
92: 'Right Windows Key',
93: 'Windows Menu / Right ⌘',
96: 'numpad 0',
97: 'numpad 1',
98: 'numpad 2',
99: 'numpad 3',
100: 'numpad 4',
101: 'numpad 5',
102: 'numpad 6',
103: 'numpad 7',
104: 'numpad 8',
105: 'numpad 9',
106: 'multiply',
107: 'add',
109: 'subtract',
110: 'decimal point',
111: 'divide',
112: 'f1',
113: 'f2',
114: 'f3',
115: 'f4',
116: 'f5',
117: 'f6',
118: 'f7',
119: 'f8',
120: 'f9',
121: 'f10',
122: 'f11',
123: 'f12',
124: 'f13',
125: 'f14',
126: 'f15',
127: 'f16',
128: 'f17',
129: 'f18',
130: 'f19',
131: 'f20',
132: 'f21',
133: 'f22',
134: 'f23',
135: 'f24',
144: 'num lock',
145: 'scroll lock',
186: '&semi;',
187: '&equals;',
188: '&comma;',
189: '&hyphen;',
190: '&period;',
191: '&quest;',
192: '&grave;',
219: '&lsqb;',
220: '&bsol;',
221: '&rsqb;',
222: '&apos;',
};

383
js/bootstrap.min.js vendored Normal file
View File

@ -0,0 +1,383 @@
/*!
* Bootstrap v4.5.2 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,n){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=/* */i(e),a=/* */i(n);function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function l(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.2): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
* ------------------------------------------------------------------------
*/
var u="transitionend";function d(t){var e=this,n=!1;return o.default(this).one(c.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||c.triggerTransitionEnd(e)},t),this}
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
var c={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{
// eslint-disable-next-line no-bitwise
t+=~~(1e6*Math.random());// "~~" acts like a faster Math.floor() here
}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;// Get transition-duration of the element
var e=o.default(t).css("transition-duration"),n=o.default(t).css("transition-delay"),i=parseFloat(e),a=parseFloat(n);// Return 0 if element or transition duration is not found
return i||a?(// If multiple durations are defined, take the first
e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){o.default(t).trigger(u)},
// TODO: Remove in v5
supportsTransitionEnd:function(){return Boolean(u)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],a=e[i],s=a&&c.isElement(a)?"element":null==(l=a)?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}// Shoutout AngusCroll (https://goo.gl/pxwQGp)
var l},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;// Can find the shadow root otherwise it'll return the document
if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:// when we don't find a shadow root
t.parentNode?c.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if(void 0===o.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=o.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};c.jQueryDetection(),o.default.fn.emulateTransitionEnd=d,o.default.event.special[c.TRANSITION_END]={bindType:u,delegateType:u,handle:function(t){if(o.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments);// eslint-disable-line prefer-rest-params
}};
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var f=o.default.fn.alert,h=/* */function(){function t(t){this._element=t}// Getters
var e=t.prototype;
// Public
return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.default.removeData(this._element,"bs.alert"),this._element=null}// Private
,e._getRootElement=function(t){var e=c.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=o.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=o.default.Event("close.bs.alert");return o.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(o.default(t).removeClass("show"),o.default(t).hasClass("fade")){var n=c.getTransitionDurationFromElement(t);o.default(t).one(c.TRANSITION_END,function(n){return e._destroyElement(t,n)}).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){o.default(t).detach().trigger("closed.bs.alert").remove()}// Static
,t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this),i=n.data("bs.alert");i||(i=new t(this),n.data("bs.alert",i)),"close"===e&&i[e](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},l(t,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),t}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
o.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',h._handleDismiss(new h)),
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
o.default.fn.alert=h._jQueryInterface,o.default.fn.alert.Constructor=h,o.default.fn.alert.noConflict=function(){return o.default.fn.alert=f,h._jQueryInterface};
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var g=o.default.fn.button,m=/* */function(){function t(t){this._element=t}// Getters
var e=t.prototype;
// Public
return e.toggle=function(){var t=!0,e=!0,n=o.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var i=this._element.querySelector('input:not([type="hidden"])');if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains("active"))t=!1;else{var a=n.querySelector(".active");a&&o.default(a).removeClass("active")}t&&(
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
"checkbox"!==i.type&&"radio"!==i.type||(i.checked=!this._element.classList.contains("active")),o.default(i).trigger("change")),i.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&o.default(this._element).toggleClass("active"))},e.dispose=function(){o.default.removeData(this._element,"bs.button"),this._element=null}// Static
,t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this).data("bs.button");n||(n=new t(this),o.default(this).data("bs.button",n)),"toggle"===e&&n[e]()})},l(t,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),t}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
o.default(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=t.target,n=e;if(o.default(e).hasClass("btn")||(e=o.default(e).closest(".btn")[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();// work around Firefox bug #1540995
else{var i=e.querySelector('input:not([type="hidden"])');if(i&&(i.hasAttribute("disabled")||i.classList.contains("disabled")))// work around Firefox bug #1540995
return void t.preventDefault();("LABEL"!==n.tagName||i&&"checkbox"!==i.type)&&m._jQueryInterface.call(o.default(e),"toggle")}}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=o.default(t.target).closest(".btn")[0];o.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))}),o.default(window).on("load.bs.button.data-api",function(){for(
// ensure correct active class is set to match the controls' actual values/states
// find all checkboxes/readio buttons inside data-toggle groups
var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}// find all button toggles
for(var a=0,s=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;a<s;a++){var l=t[a];"true"===l.getAttribute("aria-pressed")?l.classList.add("active"):l.classList.remove("active")}}),
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
o.default.fn.button=m._jQueryInterface,o.default.fn.button.Constructor=m,o.default.fn.button.noConflict=function(){return o.default.fn.button=g,m._jQueryInterface};
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var p="carousel",_=".bs.carousel",v=o.default.fn[p],b={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},y={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},E=".carousel-indicators",w={TOUCH:"touch",PEN:"pen"},T=/* */function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(E),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}// Getters
var e=t.prototype;
// Public
return e.next=function(){this._isSliding||this._slide("next")},e.nextWhenVisible=function(){
// Don't call next when the page isn't visible
// or the carousel or its parent isn't visible
!document.hidden&&o.default(this._element).is(":visible")&&"hidden"!==o.default(this._element).css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide("prev")},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(c.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(".active.carousel-item");var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)o.default(this._element).one("slid.bs.carousel",function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=t>n?"next":"prev";this._slide(i,this._items[t])}},e.dispose=function(){o.default(this._element).off(_),o.default.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null}// Private
,e._getConfig=function(t){return t=r({},b,t),c.typeCheckConfig(p,t,y),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,// swipe left
e>0&&this.prev(),// swipe right
e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&o.default(this._element).on("keydown.bs.carousel",function(e){return t._keydown(e)}),"hover"===this._config.pause&&o.default(this._element).on("mouseenter.bs.carousel",function(e){return t.pause(e)}).on("mouseleave.bs.carousel",function(e){return t.cycle(e)}),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&w[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&w[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(
// If it's a touch-enabled device, mouseenter/leave are fired as
// part of the mouse compatibility events on first tap - the carousel
// would stop cycling until user tapped out of it;
// here, we listen for touchend, explicitly pause the carousel
// (as if it's the second time we tap on it, mouseenter compat event
// is NOT fired) and after a timeout (to allow for mouse compatibility
// events to fire) we explicitly restart cycling
t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval))};o.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",function(t){return t.preventDefault()}),this._pointerEvent?(o.default(this._element).on("pointerdown.bs.carousel",function(t){return e(t)}),o.default(this._element).on("pointerup.bs.carousel",function(t){return n(t)}),this._element.classList.add("pointer-event")):(o.default(this._element).on("touchstart.bs.carousel",function(t){return e(t)}),o.default(this._element).on("touchmove.bs.carousel",function(e){return function(e){
// ensure swiping with one touch and not pinching
e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)}),o.default(this._element).on("touchend.bs.carousel",function(t){return n(t)}))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),a=this._items.length-1;if((i&&0===o||n&&o===a)&&!this._config.wrap)return e;var s=(o+("prev"===t?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(".active.carousel-item")),a=o.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:i,to:n});return o.default(this._element).trigger(a),a},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));o.default(e).removeClass("active");var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&o.default(n).addClass("active")}},e._slide=function(t,e){var n,i,a,s=this,l=this._element.querySelector(".active.carousel-item"),r=this._getItemIndex(l),u=e||l&&this._getItemByDirection(t,l),d=this._getItemIndex(u),f=Boolean(this._interval);if("next"===t?(n="carousel-item-left",i="carousel-item-next",a="left"):(n="carousel-item-right",i="carousel-item-prev",a="right"),u&&o.default(u).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(u,a).isDefaultPrevented()&&l&&u){this._isSliding=!0,f&&this.pause(),this._setActiveIndicatorElement(u);var h=o.default.Event("slid.bs.carousel",{relatedTarget:u,direction:a,from:r,to:d});if(o.default(this._element).hasClass("slide")){o.default(u).addClass(i),c.reflow(u),o.default(l).addClass(n),o.default(u).addClass(n);var g=parseInt(u.getAttribute("data-interval"),10);g?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=g):this._config.interval=this._config.defaultInterval||this._config.interval;var m=c.getTransitionDurationFromElement(l);o.default(l).one(c.TRANSITION_END,function(){o.default(u).removeClass(n+" "+i).addClass("active"),o.default(l).removeClass("active "+i+" "+n),s._isSliding=!1,setTimeout(function(){return o.default(s._element).trigger(h)},0)}).emulateTransitionEnd(m)}else o.default(l).removeClass("active"),o.default(u).addClass("active"),this._isSliding=!1,o.default(this._element).trigger(h);f&&this.cycle()}}// Static
,t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this).data("bs.carousel"),i=r({},b,o.default(this).data());"object"==typeof e&&(i=r({},i,e));var a="string"==typeof e?e:i.slide;if(n||(n=new t(this,i),o.default(this).data("bs.carousel",n)),"number"==typeof e)n.to(e);else if("string"==typeof a){if(void 0===n[a])throw new TypeError('No method named "'+a+'"');n[a]()}else i.interval&&i.ride&&(n.pause(),n.cycle())})},t._dataApiClickHandler=function(e){var n=c.getSelectorFromElement(this);if(n){var i=o.default(n)[0];if(i&&o.default(i).hasClass("carousel")){var a=r({},o.default(i).data(),o.default(this).data()),s=this.getAttribute("data-slide-to");s&&(a.interval=!1),t._jQueryInterface.call(o.default(i),a),s&&o.default(i).data("bs.carousel").to(s),e.preventDefault()}}},l(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return b}}]),t}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
o.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",T._dataApiClickHandler),o.default(window).on("load.bs.carousel.data-api",function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e<n;e++){var i=o.default(t[e]);T._jQueryInterface.call(i,i.data())}}),
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
o.default.fn[p]=T._jQueryInterface,o.default.fn[p].Constructor=T,o.default.fn[p].noConflict=function(){return o.default.fn[p]=v,T._jQueryInterface};
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var C="collapse",S=o.default.fn[C],D={toggle:!0,parent:""},k={toggle:"boolean",parent:"(string|element)"},N='[data-toggle="collapse"]',A=/* */function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(N)),i=0,o=n.length;i<o;i++){var a=n[i],s=c.getSelectorFromElement(a),l=[].slice.call(document.querySelectorAll(s)).filter(function(e){return e===t});null!==s&&l.length>0&&(this._selector=s,this._triggerArray.push(a))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}// Getters
var e=t.prototype;
// Public
return e.toggle=function(){o.default(this._element).hasClass("show")?this.hide():this.show()},e.show=function(){var e,n,i=this;if(!this._isTransitioning&&!o.default(this._element).hasClass("show")&&(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter(function(t){return"string"==typeof i._config.parent?t.getAttribute("data-parent")===i._config.parent:t.classList.contains("collapse")})).length&&(e=null),!(e&&(n=o.default(e).not(this._selector).data("bs.collapse"))&&n._isTransitioning))){var a=o.default.Event("show.bs.collapse");if(o.default(this._element).trigger(a),!a.isDefaultPrevented()){e&&(t._jQueryInterface.call(o.default(e).not(this._selector),"hide"),n||o.default(e).data("bs.collapse",null));var s=this._getDimension();o.default(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[s]=0,this._triggerArray.length&&o.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var l="scroll"+(s[0].toUpperCase()+s.slice(1)),r=c.getTransitionDurationFromElement(this._element);o.default(this._element).one(c.TRANSITION_END,function(){o.default(i._element).removeClass("collapsing").addClass("collapse show"),i._element.style[s]="",i.setTransitioning(!1),o.default(i._element).trigger("shown.bs.collapse")}).emulateTransitionEnd(r),this._element.style[s]=this._element[l]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&o.default(this._element).hasClass("show")){var e=o.default.Event("hide.bs.collapse");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",c.reflow(this._element),o.default(this._element).addClass("collapsing").removeClass("collapse show");var i=this._triggerArray.length;if(i>0)for(var a=0;a<i;a++){var s=this._triggerArray[a],l=c.getSelectorFromElement(s);if(null!==l)o.default([].slice.call(document.querySelectorAll(l))).hasClass("show")||o.default(s).addClass("collapsed").attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var r=c.getTransitionDurationFromElement(this._element);o.default(this._element).one(c.TRANSITION_END,function(){t.setTransitioning(!1),o.default(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")}).emulateTransitionEnd(r)}}},e.setTransitioning=function(t){this._isTransitioning=t},e.dispose=function(){o.default.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}// Private
,e._getConfig=function(t){return(t=r({},D,t)).toggle=Boolean(t.toggle),// Coerce string values
c.typeCheckConfig(C,t,k),t},e._getDimension=function(){return o.default(this._element).hasClass("width")?"width":"height"},e._getParent=function(){var e,n=this;c.isElement(this._config.parent)?(e=this._config.parent,// It's a jQuery object
void 0!==this._config.parent.jquery&&(e=this._config.parent[0])):e=document.querySelector(this._config.parent);var i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',a=[].slice.call(e.querySelectorAll(i));return o.default(a).each(function(e,i){n._addAriaAndCollapsedClass(t._getTargetFromElement(i),[i])}),e},e._addAriaAndCollapsedClass=function(t,e){var n=o.default(t).hasClass("show");e.length&&o.default(e).toggleClass("collapsed",!n).attr("aria-expanded",n)}// Static
,t._getTargetFromElement=function(t){var e=c.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this),i=n.data("bs.collapse"),a=r({},D,n.data(),"object"==typeof e&&e?e:{});if(!i&&a.toggle&&"string"==typeof e&&/show|hide/.test(e)&&(a.toggle=!1),i||(i=new t(this,a),n.data("bs.collapse",i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},l(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return D}}]),t}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
o.default(document).on("click.bs.collapse.data-api",N,function(t){
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
"A"===t.currentTarget.tagName&&t.preventDefault();var e=o.default(this),n=c.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(n));o.default(i).each(function(){var t=o.default(this),n=t.data("bs.collapse")?"toggle":e.data();A._jQueryInterface.call(t,n)})}),
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
o.default.fn[C]=A._jQueryInterface,o.default.fn[C].Constructor=A,o.default.fn[C].noConflict=function(){return o.default.fn[C]=S,A._jQueryInterface};
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var I="dropdown",j=o.default.fn[I],O=new RegExp("38|40|27"),x={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},P={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},R=/* */function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}// Getters
var e=t.prototype;
// Public
return e.toggle=function(){if(!this._element.disabled&&!o.default(this._element).hasClass("disabled")){var e=o.default(this._menu).hasClass("show");t._clearMenus(),e||this.show(!0)}},e.show=function(e){if(void 0===e&&(e=!1),!(this._element.disabled||o.default(this._element).hasClass("disabled")||o.default(this._menu).hasClass("show"))){var n={relatedTarget:this._element},i=o.default.Event("show.bs.dropdown",n),s=t._getParentFromElement(this._element);if(o.default(s).trigger(i),!i.isDefaultPrevented()){// Disable totally Popper.js for Dropdown in Navbar
if(!this._inNavbar&&e){
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if(void 0===a.default)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var l=this._element;"parent"===this._config.reference?l=s:c.isElement(this._config.reference)&&(l=this._config.reference,// Check if it's jQuery element
void 0!==this._config.reference.jquery&&(l=this._config.reference[0])),// If boundary is not `scrollParent`, then set position to `static`
// to allow the menu to "escape" the scroll parent's boundaries
// https://github.com/twbs/bootstrap/issues/24251
"scrollParent"!==this._config.boundary&&o.default(s).addClass("position-static"),this._popper=new a.default(l,this._menu,this._getPopperConfig())}// If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
"ontouchstart"in document.documentElement&&0===o.default(s).closest(".navbar-nav").length&&o.default(document.body).children().on("mouseover",null,o.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),o.default(this._menu).toggleClass("show"),o.default(s).toggleClass("show").trigger(o.default.Event("shown.bs.dropdown",n))}}},e.hide=function(){if(!this._element.disabled&&!o.default(this._element).hasClass("disabled")&&o.default(this._menu).hasClass("show")){var e={relatedTarget:this._element},n=o.default.Event("hide.bs.dropdown",e),i=t._getParentFromElement(this._element);o.default(i).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),o.default(this._menu).toggleClass("show"),o.default(i).toggleClass("show").trigger(o.default.Event("hidden.bs.dropdown",e)))}},e.dispose=function(){o.default.removeData(this._element,"bs.dropdown"),o.default(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()}// Private
,e._addEventListeners=function(){var t=this;o.default(this._element).on("click.bs.dropdown",function(e){e.preventDefault(),e.stopPropagation(),t.toggle()})},e._getConfig=function(t){return t=r({},this.constructor.Default,o.default(this._element).data(),t),c.typeCheckConfig(I,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(".dropdown-menu"))}return this._menu},e._getPlacement=function(){var t=o.default(this._element.parentNode),e="bottom-start";// Handle dropup
return t.hasClass("dropup")?e=o.default(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":t.hasClass("dropright")?e="right-start":t.hasClass("dropleft")?e="left-start":o.default(this._menu).hasClass("dropdown-menu-right")&&(e="bottom-end"),e},e._detectNavbar=function(){return o.default(this._element).closest(".navbar").length>0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};// Disable Popper.js if we have a static display
return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),r({},t,this._config.popperConfig)}// Static
,t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this).data("bs.dropdown");if(n||(n=new t(this,"object"==typeof e?e:null),o.default(this).data("bs.dropdown",n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),i=0,a=n.length;i<a;i++){var s=t._getParentFromElement(n[i]),l=o.default(n[i]).data("bs.dropdown"),r={relatedTarget:n[i]};if(e&&"click"===e.type&&(r.clickEvent=e),l){var u=l._menu;if(o.default(s).hasClass("show")&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&o.default.contains(s,e.target))){var d=o.default.Event("hide.bs.dropdown",r);o.default(s).trigger(d),d.isDefaultPrevented()||(// If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
"ontouchstart"in document.documentElement&&o.default(document.body).children().off("mouseover",null,o.default.noop),n[i].setAttribute("aria-expanded","false"),l._popper&&l._popper.destroy(),o.default(u).removeClass("show"),o.default(s).removeClass("show").trigger(o.default.Event("hidden.bs.dropdown",r)))}}}},t._getParentFromElement=function(t){var e,n=c.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode}// eslint-disable-next-line complexity
,t._dataApiKeydownHandler=function(e){
// If not input/textarea:
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
// If input/textarea:
// - If space key => not a dropdown command
// - If key is other than escape
// - If key is not up or down => not a dropdown command
// - If trigger inside the menu => not a dropdown command
if((/input|textarea/i.test(e.target.tagName)?!(32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||o.default(e.target).closest(".dropdown-menu").length)):O.test(e.which))&&!this.disabled&&!o.default(this).hasClass("disabled")){var n=t._getParentFromElement(this),i=o.default(n).hasClass("show");if(i||27!==e.which){if(e.preventDefault(),e.stopPropagation(),!i||i&&(27===e.which||32===e.which))return 27===e.which&&o.default(n.querySelector('[data-toggle="dropdown"]')).trigger("focus"),void o.default(this).trigger("click");var a=[].slice.call(n.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter(function(t){return o.default(t).is(":visible")});if(0!==a.length){var s=a.indexOf(e.target);38===e.which&&s>0&&
// Up
s--,40===e.which&&s<a.length-1&&
// Down
s++,s<0&&(s=0),a[s].focus()}}}},l(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return x}},{key:"DefaultType",get:function(){return P}}]),t}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
o.default(document).on("keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',R._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api",".dropdown-menu",R._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api",R._clearMenus).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',function(t){t.preventDefault(),t.stopPropagation(),R._jQueryInterface.call(o.default(this),"toggle")}).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}),
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
o.default.fn[I]=R._jQueryInterface,o.default.fn[I].Constructor=R,o.default.fn[I].noConflict=function(){return o.default.fn[I]=j,R._jQueryInterface};
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var L=o.default.fn.modal,q={backdrop:!0,keyboard:!0,focus:!0,show:!0},F={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Q=".modal-dialog",B=/* */function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(Q),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}// Getters
var e=t.prototype;
// Public
return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){o.default(this._element).hasClass("fade")&&(this._isTransitioning=!0);var n=o.default.Event("show.bs.modal",{relatedTarget:t});o.default(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),o.default(this._element).on("click.dismiss.bs.modal",'[data-dismiss="modal"]',function(t){return e.hide(t)}),o.default(this._dialog).on("mousedown.dismiss.bs.modal",function(){o.default(e._element).one("mouseup.dismiss.bs.modal",function(t){o.default(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=o.default.Event("hide.bs.modal");if(o.default(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=o.default(this._element).hasClass("fade");if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),o.default(document).off("focusin.bs.modal"),o.default(this._element).removeClass("show"),o.default(this._element).off("click.dismiss.bs.modal"),o.default(this._dialog).off("mousedown.dismiss.bs.modal"),i){var a=c.getTransitionDurationFromElement(this._element);o.default(this._element).one(c.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(a)}else this._hideModal()}}},e.dispose=function(){[window,this._element,this._dialog].forEach(function(t){return o.default(t).off(".bs.modal")}),
/**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
* Do not move `document` in `htmlElements` array
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
o.default(document).off("focusin.bs.modal"),o.default.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()}// Private
,e._getConfig=function(t){return t=r({},q,t),c.typeCheckConfig("modal",t,F),t},e._triggerBackdropTransition=function(){var t=this;if("static"===this._config.backdrop){var e=o.default.Event("hidePrevented.bs.modal");if(o.default(this._element).trigger(e),e.defaultPrevented)return;var n=this._element.scrollHeight>document.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var i=c.getTransitionDurationFromElement(this._dialog);o.default(this._element).off(c.TRANSITION_END),o.default(this._element).one(c.TRANSITION_END,function(){t._element.classList.remove("modal-static"),n||o.default(t._element).one(c.TRANSITION_END,function(){t._element.style.overflowY=""}).emulateTransitionEnd(t._element,i)}).emulateTransitionEnd(i),this._element.focus()}else this.hide()},e._showElement=function(t){var e=this,n=o.default(this._element).hasClass("fade"),i=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||
// Don't move modal's DOM position
document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),o.default(this._dialog).hasClass("modal-dialog-scrollable")&&i?i.scrollTop=0:this._element.scrollTop=0,n&&c.reflow(this._element),o.default(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var a=o.default.Event("shown.bs.modal",{relatedTarget:t}),s=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,o.default(e._element).trigger(a)};if(n){var l=c.getTransitionDurationFromElement(this._dialog);o.default(this._dialog).one(c.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},e._enforceFocus=function(){var t=this;o.default(document).off("focusin.bs.modal").on("focusin.bs.modal",function(e){document!==e.target&&t._element!==e.target&&0===o.default(t._element).has(e.target).length&&t._element.focus()})},e._setEscapeEvent=function(){var t=this;this._isShown?o.default(this._element).on("keydown.dismiss.bs.modal",function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()}):this._isShown||o.default(this._element).off("keydown.dismiss.bs.modal")},e._setResizeEvent=function(){var t=this;this._isShown?o.default(window).on("resize.bs.modal",function(e){return t.handleUpdate(e)}):o.default(window).off("resize.bs.modal")},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop(function(){o.default(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),o.default(t._element).trigger("hidden.bs.modal")})},e._removeBackdrop=function(){this._backdrop&&(o.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=o.default(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),o.default(this._backdrop).appendTo(document.body),o.default(this._element).on("click.dismiss.bs.modal",function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&e._triggerBackdropTransition()}),n&&c.reflow(this._backdrop),o.default(this._backdrop).addClass("show"),!t)return;if(!n)return void t();var i=c.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(c.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){o.default(this._backdrop).removeClass("show");var a=function(){e._removeBackdrop(),t&&t()};if(o.default(this._element).hasClass("fade")){var s=c.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(c.TRANSITION_END,a).emulateTransitionEnd(s)}else a()}else t&&t()}// ----------------------------------------------------------------------
// the following methods are used to handle overflowing modals
// todo (fat): these should probably be refactored out of modal.js
// ----------------------------------------------------------------------
,e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
var e=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")),n=[].slice.call(document.querySelectorAll(".sticky-top"));// Adjust fixed content padding
o.default(e).each(function(e,n){var i=n.style.paddingRight,a=o.default(n).css("padding-right");o.default(n).data("padding-right",i).css("padding-right",parseFloat(a)+t._scrollbarWidth+"px")}),// Adjust sticky content margin
o.default(n).each(function(e,n){var i=n.style.marginRight,a=o.default(n).css("margin-right");o.default(n).data("margin-right",i).css("margin-right",parseFloat(a)-t._scrollbarWidth+"px")});// Adjust body padding
var i=document.body.style.paddingRight,a=o.default(document.body).css("padding-right");o.default(document.body).data("padding-right",i).css("padding-right",parseFloat(a)+this._scrollbarWidth+"px")}o.default(document.body).addClass("modal-open")},e._resetScrollbar=function(){
// Restore fixed content padding
var t=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"));o.default(t).each(function(t,e){var n=o.default(e).data("padding-right");o.default(e).removeData("padding-right"),e.style.paddingRight=n||""});// Restore sticky content
var e=[].slice.call(document.querySelectorAll(".sticky-top"));o.default(e).each(function(t,e){var n=o.default(e).data("margin-right");void 0!==n&&o.default(e).css("margin-right",n).removeData("margin-right")});// Restore body padding
var n=o.default(document.body).data("padding-right");o.default(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},e._getScrollbarWidth=function(){
// thx d.walsh
var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}// Static
,t._jQueryInterface=function(e,n){return this.each(function(){var i=o.default(this).data("bs.modal"),a=r({},q,o.default(this).data(),"object"==typeof e&&e?e:{});if(i||(i=new t(this,a),o.default(this).data("bs.modal",i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e](n)}else a.show&&i.show(n)})},l(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return q}}]),t}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
o.default(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e,n=this,i=c.getSelectorFromElement(this);i&&(e=document.querySelector(i));var a=o.default(e).data("bs.modal")?"toggle":r({},o.default(e).data(),o.default(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var s=o.default(e).one("show.bs.modal",function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",function(){o.default(n).is(":visible")&&n.focus()})});B._jQueryInterface.call(o.default(e),a,this)}),
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
o.default.fn.modal=B._jQueryInterface,o.default.fn.modal.Constructor=B,o.default.fn.modal.noConflict=function(){return o.default.fn.modal=L,B._jQueryInterface};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.5.2): tools/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var H=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],U={
// Global attributes allowed on any supplied element below.
"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},M=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,W=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function V(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),a=[].slice.call(i.body.querySelectorAll("*")),s=function(t,n){var i=a[t],s=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var l=[].slice.call(i.attributes),r=[].concat(e["*"]||[],e[s]||[]);l.forEach(function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===H.indexOf(n)||Boolean(t.nodeValue.match(M)||t.nodeValue.match(W));// Check if a regular expression validates the attribute.
for(var i=e.filter(function(t){return t instanceof RegExp}),o=0,a=i.length;o<a;o++)if(n.match(i[o]))return!0;return!1})(t,r)||i.removeAttribute(t.nodeName)})},l=0,r=a.length;l<r;l++)s(l);return i.body.innerHTML}
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/var z="tooltip",K=o.default.fn.tooltip,X=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Y=["sanitize","whiteList","sanitizeFn"],$={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},J={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},G={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:U,popperConfig:null},Z={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},tt=/* */function(){function t(t,e){if(void 0===a.default)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");// private
this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,// Protected
this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}// Getters
var e=t.prototype;
// Public
return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=o.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(o.default(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),o.default.removeData(this.element,this.constructor.DATA_KEY),o.default(this.element).off(this.constructor.EVENT_KEY),o.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&o.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===o.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=o.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){o.default(this.element).trigger(e);var n=c.findShadowRoot(this.element),i=o.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!i)return;var s=this.getTipElement(),l=c.getUID(this.constructor.NAME);s.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&o.default(s).addClass("fade");var r="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,u=this._getAttachment(r);this.addAttachmentClass(u);var d=this._getContainer();o.default(s).data(this.constructor.DATA_KEY,this),o.default.contains(this.element.ownerDocument.documentElement,this.tip)||o.default(s).appendTo(d),o.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new a.default(this.element,s,this._getPopperConfig(u)),o.default(s).addClass("show"),// If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
"ontouchstart"in document.documentElement&&o.default(document.body).children().on("mouseover",null,o.default.noop);var f=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,o.default(t.element).trigger(t.constructor.Event.SHOWN),"out"===e&&t._leave(null,t)};if(o.default(this.tip).hasClass("fade")){var h=c.getTransitionDurationFromElement(this.tip);o.default(this.tip).one(c.TRANSITION_END,f).emulateTransitionEnd(h)}else f()}},e.hide=function(t){var e=this,n=this.getTipElement(),i=o.default.Event(this.constructor.Event.HIDE),a=function(){"show"!==e._hoverState&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),o.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(o.default(this.element).trigger(i),!i.isDefaultPrevented()){if(o.default(n).removeClass("show"),// If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
"ontouchstart"in document.documentElement&&o.default(document.body).children().off("mouseover",null,o.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,o.default(this.tip).hasClass("fade")){var s=c.getTransitionDurationFromElement(n);o.default(n).one(c.TRANSITION_END,a).emulateTransitionEnd(s)}else a();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()}// Protected
,e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(o.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),o.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=V(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):
// Content is a DOM node or a jQuery
this.config.html?o.default(e).parent().is(t)||t.empty().append(e):t.text(o.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t}// Private
,e._getPopperConfig=function(t){var e=this;return r({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:c.isElement(this.config.container)?o.default(this.config.container):o.default(document).find(this.config.container)},e._getAttachment=function(t){return J[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach(function(e){if("click"===e)o.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if("manual"!==e){var n="hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;o.default(t.element).on(n,t.config.selector,function(e){return t._enter(e)}).on(i,t.config.selector,function(e){return t._leave(e)})}}),this._hideModalHandler=function(){t.element&&t.hide()},o.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),o.default(e.getTipElement()).hasClass("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){"show"===e._hoverState&&e.show()},e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){"out"===e._hoverState&&e.hide()},e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=o.default(this.element).data();return Object.keys(e).forEach(function(t){-1!==Y.indexOf(t)&&delete e[t]}),"number"==typeof(t=r({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),c.typeCheckConfig(z,t,this.constructor.DefaultType),t.sanitize&&(t.template=V(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(X);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(o.default(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)}// Static
,t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this).data("bs.tooltip"),i="object"==typeof e&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new t(this,i),o.default(this).data("bs.tooltip",n)),"string"==typeof e)){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},l(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return G}},{key:"NAME",get:function(){return z}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Z}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return $}}]),t}();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
o.default.fn.tooltip=tt._jQueryInterface,o.default.fn.tooltip.Constructor=tt,o.default.fn.tooltip.noConflict=function(){return o.default.fn.tooltip=K,tt._jQueryInterface};
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var et="popover",nt=o.default.fn.popover,it=new RegExp("(^|\\s)bs-popover\\S+","g"),ot=r({},tt.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),at=r({},tt.DefaultType,{content:"(string|element|function)"}),st={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},lt=/* */function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var a=i.prototype;
// Overrides
return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},a.setContent=function(){var t=o.default(this.getTipElement());// We use append for html objects to maintain js events
this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")}// Private
,a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(it);null!==e&&e.length>0&&t.removeClass(e.join(""))}// Static
,i._jQueryInterface=function(t){return this.each(function(){var e=o.default(this).data("bs.popover"),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new i(this,n),o.default(this).data("bs.popover",e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError('No method named "'+t+'"');e[t]()}})},l(i,null,[{key:"VERSION",
// Getters
get:function(){return"4.5.2"}},{key:"Default",get:function(){return ot}},{key:"NAME",get:function(){return et}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return st}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return at}}]),i}(tt);
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
o.default.fn.popover=lt._jQueryInterface,o.default.fn.popover.Constructor=lt,o.default.fn.popover.noConflict=function(){return o.default.fn.popover=nt,lt._jQueryInterface};
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var rt="scrollspy",ut=o.default.fn[rt],dt={offset:10,method:"auto",target:""},ct={offset:"number",method:"string",target:"(string|element)"},ft="scroll.bs.scrollspy",ht=".nav-link",gt=".list-group-item",mt=".dropdown-item",pt=/* */function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+ht+","+this._config.target+" "+gt+","+this._config.target+" "+mt,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,o.default(this._scrollElement).on(ft,function(t){return n._process(t)}),this.refresh(),this._process()}// Getters
var e=t.prototype;
// Public
return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":"position",n="auto"===this._config.method?e:this._config.method,i="position"===n?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var e,a=c.getSelectorFromElement(t);if(a&&(e=document.querySelector(a)),e){var s=e.getBoundingClientRect();if(s.width||s.height)
// TODO (fat): remove sketch reliance on jQuery position/offset
return[o.default(e)[n]().top+i,a]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},e.dispose=function(){o.default.removeData(this._element,"bs.scrollspy"),o.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}// Private
,e._getConfig=function(t){if("string"!=typeof(t=r({},dt,"object"==typeof t&&t?t:{})).target&&c.isElement(t.target)){var e=o.default(t.target).attr("id");e||(e=c.getUID(rt),o.default(t.target).attr("id",e)),t.target="#"+e}return c.typeCheckConfig(rt,t,ct),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map(function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'}),n=o.default([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass("active"),n.addClass("active")):(
// Set triggered link as active
n.addClass("active"),// Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
n.parents(".nav, .list-group").prev(ht+", "+gt).addClass("active"),// Handle special case when .nav-link is inside .nav-item
n.parents(".nav, .list-group").prev(".nav-item").children(ht).addClass("active")),o.default(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},e._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(t){return t.classList.contains("active")}).forEach(function(t){return t.classList.remove("active")})}// Static
,t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this).data("bs.scrollspy");if(n||(n=new t(this,"object"==typeof e&&e),o.default(this).data("bs.scrollspy",n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},l(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return dt}}]),t}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
o.default(window).on("load.bs.scrollspy.data-api",function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),e=t.length;e--;){var n=o.default(t[e]);pt._jQueryInterface.call(n,n.data())}}),
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
o.default.fn[rt]=pt._jQueryInterface,o.default.fn[rt].Constructor=pt,o.default.fn[rt].noConflict=function(){return o.default.fn[rt]=ut,pt._jQueryInterface};
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var _t=o.default.fn.tab,vt=/* */function(){function t(t){this._element=t}// Getters
var e=t.prototype;
// Public
return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&o.default(this._element).hasClass("active")||o.default(this._element).hasClass("disabled"))){var e,n,i=o.default(this._element).closest(".nav, .list-group")[0],a=c.getSelectorFromElement(this._element);if(i){var s="UL"===i.nodeName||"OL"===i.nodeName?"> li > .active":".active";n=(n=o.default.makeArray(o.default(i).find(s)))[n.length-1]}var l=o.default.Event("hide.bs.tab",{relatedTarget:this._element}),r=o.default.Event("show.bs.tab",{relatedTarget:n});if(n&&o.default(n).trigger(l),o.default(this._element).trigger(r),!r.isDefaultPrevented()&&!l.isDefaultPrevented()){a&&(e=document.querySelector(a)),this._activate(this._element,i);var u=function(){var e=o.default.Event("hidden.bs.tab",{relatedTarget:t._element}),i=o.default.Event("shown.bs.tab",{relatedTarget:n});o.default(n).trigger(e),o.default(t._element).trigger(i)};e?this._activate(e,e.parentNode,u):u()}}},e.dispose=function(){o.default.removeData(this._element,"bs.tab"),this._element=null}// Private
,e._activate=function(t,e,n){var i=this,a=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?o.default(e).children(".active"):o.default(e).find("> li > .active"))[0],s=n&&a&&o.default(a).hasClass("fade"),l=function(){return i._transitionComplete(t,a,n)};if(a&&s){var r=c.getTransitionDurationFromElement(a);o.default(a).removeClass("show").one(c.TRANSITION_END,l).emulateTransitionEnd(r)}else l()},e._transitionComplete=function(t,e,n){if(e){o.default(e).removeClass("active");var i=o.default(e.parentNode).find("> .dropdown-menu .active")[0];i&&o.default(i).removeClass("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(o.default(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),c.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&o.default(t.parentNode).hasClass("dropdown-menu")){var a=o.default(t).closest(".dropdown")[0];if(a){var s=[].slice.call(a.querySelectorAll(".dropdown-toggle"));o.default(s).addClass("active")}t.setAttribute("aria-expanded",!0)}n&&n()}// Static
,t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this),i=n.data("bs.tab");if(i||(i=new t(this),n.data("bs.tab",i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},l(t,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),t}();
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
o.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',function(t){t.preventDefault(),vt._jQueryInterface.call(o.default(this),"show")}),
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
o.default.fn.tab=vt._jQueryInterface,o.default.fn.tab.Constructor=vt,o.default.fn.tab.noConflict=function(){return o.default.fn.tab=_t,vt._jQueryInterface};
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var bt=o.default.fn.toast,yt={animation:"boolean",autohide:"boolean",delay:"number"},Et={animation:!0,autohide:!0,delay:500},wt=/* */function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}// Getters
var e=t.prototype;
// Public
return e.show=function(){var t=this,e=o.default.Event("show.bs.toast");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),o.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout(function(){t.hide()},t._config.delay))};if(this._element.classList.remove("hide"),c.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var i=c.getTransitionDurationFromElement(this._element);o.default(this._element).one(c.TRANSITION_END,n).emulateTransitionEnd(i)}else n()}},e.hide=function(){if(this._element.classList.contains("show")){var t=o.default.Event("hide.bs.toast");o.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),o.default(this._element).off("click.dismiss.bs.toast"),o.default.removeData(this._element,"bs.toast"),this._element=null,this._config=null}// Private
,e._getConfig=function(t){return t=r({},Et,o.default(this._element).data(),"object"==typeof t&&t?t:{}),c.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;o.default(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',function(){return t.hide()})},e._close=function(){var t=this,e=function(){t._element.classList.add("hide"),o.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var n=c.getTransitionDurationFromElement(this._element);o.default(this._element).one(c.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null}// Static
,t._jQueryInterface=function(e){return this.each(function(){var n=o.default(this),i=n.data("bs.toast");if(i||(i=new t(this,"object"==typeof e&&e),n.data("bs.toast",i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e](this)}})},l(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"DefaultType",get:function(){return yt}},{key:"Default",get:function(){return Et}}]),t}();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
o.default.fn.toast=wt._jQueryInterface,o.default.fn.toast.Constructor=wt,o.default.fn.toast.noConflict=function(){return o.default.fn.toast=bt,wt._jQueryInterface},t.Alert=h,t.Button=m,t.Carousel=T,t.Collapse=A,t.Dropdown=R,t.Modal=B,t.Popover=lt,t.Scrollspy=pt,t.Tab=vt,t.Toast=wt,t.Tooltip=tt,t.Util=c,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=bootstrap.js.map
//# sourceMappingURL=bootstrap.min.js.map

2
js/jquery-1.10.2.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
site_name: learngit
theme: cyborg
repo_url: https://github.com/benharri/learngit
edit_uri: blob/master/docs/
markdown_extensions:
- toc:
permalink: True

3475
search/lunr.js Normal file

File diff suppressed because it is too large Load Diff

98
search/main.js Normal file
View File

@ -0,0 +1,98 @@
function getSearchTermFromLocation() {
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++) {
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == 'q') {
return decodeURIComponent(sParameterName[1].replace(/\+/g, '%20'));
}
}
}
function joinUrl (base, path) {
if (path.substring(0, 1) === "/") {
// path starts with `/`. Thus it is absolute.
return path;
}
if (base.substring(base.length-1) === "/") {
// base ends with `/`
return base + path;
}
return base + "/" + path;
}
function formatResult (location, title, summary) {
return '<article><h3><a href="' + joinUrl(base_url, location) + '">'+ title + '</a></h3><p>' + summary +'</p></article>';
}
function displayResults (results) {
var search_results = document.getElementById("mkdocs-search-results");
while (search_results.firstChild) {
search_results.removeChild(search_results.firstChild);
}
if (results.length > 0){
for (var i=0; i < results.length; i++){
var result = results[i];
var html = formatResult(result.location, result.title, result.summary);
search_results.insertAdjacentHTML('beforeend', html);
}
} else {
search_results.insertAdjacentHTML('beforeend', "<p>No results found</p>");
}
}
function doSearch () {
var query = document.getElementById('mkdocs-search-query').value;
if (query.length > min_search_length) {
if (!window.Worker) {
displayResults(search(query));
} else {
searchWorker.postMessage({query: query});
}
} else {
// Clear results for short queries
displayResults([]);
}
}
function initSearch () {
var search_input = document.getElementById('mkdocs-search-query');
if (search_input) {
search_input.addEventListener("keyup", doSearch);
}
var term = getSearchTermFromLocation();
if (term) {
search_input.value = term;
doSearch();
}
}
function onWorkerMessage (e) {
if (e.data.allowSearch) {
initSearch();
} else if (e.data.results) {
var results = e.data.results;
displayResults(results);
} else if (e.data.config) {
min_search_length = e.data.config.min_search_length-1;
}
}
if (!window.Worker) {
console.log('Web Worker API not supported');
// load index in main thread
$.getScript(joinUrl(base_url, "search/worker.js")).done(function () {
console.log('Loaded worker');
init();
window.postMessage = function (msg) {
onWorkerMessage({data: msg});
};
}).fail(function (jqxhr, settings, exception) {
console.error('Could not load worker.js');
});
} else {
// Wrap search in a web worker
var searchWorker = new Worker(joinUrl(base_url, "search/worker.js"));
searchWorker.postMessage({init: true});
searchWorker.onmessage = onWorkerMessage;
}

1
search/search_index.json Normal file

File diff suppressed because one or more lines are too long

130
search/worker.js Normal file
View File

@ -0,0 +1,130 @@
var base_path = 'function' === typeof importScripts ? '.' : '/search/';
var allowSearch = false;
var index;
var documents = {};
var lang = ['en'];
var data;
function getScript(script, callback) {
console.log('Loading script: ' + script);
$.getScript(base_path + script).done(function () {
callback();
}).fail(function (jqxhr, settings, exception) {
console.log('Error: ' + exception);
});
}
function getScriptsInOrder(scripts, callback) {
if (scripts.length === 0) {
callback();
return;
}
getScript(scripts[0], function() {
getScriptsInOrder(scripts.slice(1), callback);
});
}
function loadScripts(urls, callback) {
if( 'function' === typeof importScripts ) {
importScripts.apply(null, urls);
callback();
} else {
getScriptsInOrder(urls, callback);
}
}
function onJSONLoaded () {
data = JSON.parse(this.responseText);
var scriptsToLoad = ['lunr.js'];
if (data.config && data.config.lang && data.config.lang.length) {
lang = data.config.lang;
}
if (lang.length > 1 || lang[0] !== "en") {
scriptsToLoad.push('lunr.stemmer.support.js');
if (lang.length > 1) {
scriptsToLoad.push('lunr.multi.js');
}
for (var i=0; i < lang.length; i++) {
if (lang[i] != 'en') {
scriptsToLoad.push(['lunr', lang[i], 'js'].join('.'));
}
}
}
loadScripts(scriptsToLoad, onScriptsLoaded);
}
function onScriptsLoaded () {
console.log('All search scripts loaded, building Lunr index...');
if (data.config && data.config.separator && data.config.separator.length) {
lunr.tokenizer.separator = new RegExp(data.config.separator);
}
if (data.index) {
index = lunr.Index.load(data.index);
data.docs.forEach(function (doc) {
documents[doc.location] = doc;
});
console.log('Lunr pre-built index loaded, search ready');
} else {
index = lunr(function () {
if (lang.length === 1 && lang[0] !== "en" && lunr[lang[0]]) {
this.use(lunr[lang[0]]);
} else if (lang.length > 1) {
this.use(lunr.multiLanguage.apply(null, lang)); // spread operator not supported in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Browser_compatibility
}
this.field('title');
this.field('text');
this.ref('location');
for (var i=0; i < data.docs.length; i++) {
var doc = data.docs[i];
this.add(doc);
documents[doc.location] = doc;
}
});
console.log('Lunr index built, search ready');
}
allowSearch = true;
postMessage({config: data.config});
postMessage({allowSearch: allowSearch});
}
function init () {
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", onJSONLoaded);
var index_path = base_path + '/search_index.json';
if( 'function' === typeof importScripts ){
index_path = 'search_index.json';
}
oReq.open("GET", index_path);
oReq.send();
}
function search (query) {
if (!allowSearch) {
console.error('Assets for search still loading');
return;
}
var resultDocuments = [];
var results = index.search(query);
for (var i=0; i < results.length; i++){
var result = results[i];
doc = documents[result.ref];
doc.summary = doc.text.substring(0, 200);
resultDocuments.push(doc);
}
return resultDocuments;
}
if( 'function' === typeof importScripts ) {
onmessage = function (e) {
if (e.data.init) {
init();
} else if (e.data.query) {
postMessage({ results: search(e.data.query) });
} else {
console.error("Worker - Unrecognized message: " + e);
}
};
}

23
sitemap.xml Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
<loc>None</loc>
<lastmod>2021-07-23</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-07-23</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-07-23</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-07-23</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2021-07-23</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

BIN
sitemap.xml.gz Normal file

Binary file not shown.

204
ssh_setup/index.html Normal file
View File

@ -0,0 +1,204 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../img/favicon.ico">
<title>ssh key setup - learngit</title>
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/font-awesome.min.css" rel="stylesheet">
<link href="../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/darcula.min.css">
<script src="../js/jquery-1.10.2.min.js" defer></script>
<script src="../js/bootstrap.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="..">learngit</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="navitem">
<a href=".." class="nav-link">learngit</a>
</li>
<li class="navitem">
<a href="../branching_strategies/" class="nav-link">branching</a>
</li>
<li class="navitem">
<a href="../common_commands/" class="nav-link">common commands</a>
</li>
<li class="navitem">
<a href="../glossary/" class="nav-link">glossary</a>
</li>
<li class="navitem active">
<a href="./" class="nav-link">ssh key setup</a>
</li>
</ul>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="nav-item">
<a rel="prev" href="../glossary/" class="nav-link">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li class="nav-item">
<a rel="next" class="nav-link disabled">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
<li class="nav-item">
<a href="https://github.com/benharri/learngit/blob/master/docs/ssh_setup.md" class="nav-link"><i class="fa fa-github"></i> Edit on GitHub</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
<div class="navbar-header">
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
<span class="fa fa-angle-down"></span>
</button>
</div>
<div id="toc-collapse" class="navbar-collapse collapse card bg-light">
<ul class="nav flex-column">
<li class="nav-item" data-level="1"><a href="#ssh-key-setup" class="nav-link">ssh key setup</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</div>
</div></div>
<div class="col-md-9" role="main">
<h1 id="ssh-key-setup">ssh key setup<a class="headerlink" href="#ssh-key-setup" title="Permanent link">&para;</a></h1>
<hr />
<p>Using SSH authentication for communicating with remote repos is generally easier than using https. Sometimes it's required for certain repos or by rules set at the hosting level.</p>
<p>Here's how to get set up with SSH keys</p>
<ol>
<li>Create an SSH public/private key pair (skip this if you already have one!)<ol>
<li>open git bash (or any other terminal that has git available)</li>
<li>type <code>ssh-keygen</code> and press enter<ul>
<li>press enter to answer each of the following questions with the default answers</li>
</ul>
</li>
<li>as long as you saved your SSH key to the default location, enter the following command: <code>cat ~/.ssh/id_rsa.pub</code></li>
<li>highlight and copy the output (starts with <code>ssh-rsa</code> and ends with <code>username@computer_name</code>)</li>
<li>navigate to your SSH key settings on your git hosting and add your key to your profile</li>
</ol>
</li>
<li>Clone or add the remote to an existing repo per the instructions on the project page using the ssh URL scheme (instead of <code>https://</code>)<ul>
<li><code>git clone git@gitawse1.hagerty.com:&lt;username&gt;/&lt;project&gt;</code></li>
<li><code>git remote add origin git@gitawse1.hagerty.com:&lt;username&gt;/&lt;project&gt;</code></li>
</ul>
</li>
<li>Profit??$?</li>
</ol>
<blockquote>
<p>You should now be able to use SSH URLs for connections between your terminal and the remote that you copied the key to</p>
</blockquote></div>
</div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../js/base.js" defer></script>
<script src="../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>