-
Notifications
You must be signed in to change notification settings - Fork 523
/
Copy pathshell.html
148 lines (146 loc) · 7.8 KB
/
shell.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<div id="shell">
<h3>The Bash Shell</h3>
<p>
Bash is a commonly-used shell that gives you the power to do
tasks more quickly.
</p>
<div>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a data-os="windows" href="#shell-windows" aria-controls="Windows" role="tab" data-toggle="tab">Windows</a></li>
<li role="presentation"><a data-os="macos" href="#shell-macos" aria-controls="MacOS" role="tab" data-toggle="tab">MacOS</a></li>
<li role="presentation"><a data-os="linux" href="#shell-linux" aria-controls="Linux" role="tab" data-toggle="tab">Linux</a></li>
</ul>
<div class="tab-content">
<article role="tabpanel" class="tab-pane active" id="shell-windows">
<ol>
<li>Download the Git for Windows <a href="https://gitforwindows.org/">installer</a>.</li>
<li>Run the installer and follow the steps below:
<ol>
{% comment %} Git 2.29.1 Setup {% endcomment %}
<li>
Click on "Next" four times (two times if you've previously
installed Git). You don't need to change anything
in the Information, location, components, and start menu screens.
</li>
<li>
<strong>
From the dropdown menu, "Choosing the default editor used by Git", select "Use the Nano editor by default" (NOTE: you will need to scroll <emph>up</emph> to find it) and click on "Next".
</strong>
</li>
{% comment %} Adjusting the name of the initial branch in new repositories {% endcomment %}
<li>
On the page that says "Adjusting the name of the initial branch in new repositories", ensure that
"Let Git decide" is selected. This will ensure the highest level of compatibility for our lessons.
{% comment %}
This section also has "Override the default branch name for new repositories" and has a text box set
to "main". I'm not having people switch to this just yet because our git lesson still uses the old paradigm.
{% endcomment %}
</li>
{% comment %} Adjusting your PATH environment {% endcomment %}
<li>
Ensure that "Git from the command line and also from 3rd-party software" is selected and
click on "Next". (If you don't do this Git Bash will not work properly, requiring you to
remove the Git Bash installation, re-run the installer and to select the "Git from the
command line and also from 3rd-party software" option.)
</li>
{% comment %} Choosing the SSH executable {% endcomment %}
<li>
Select "Use bundled OpenSSH".
</li>
{% comment %} Choosing HTTPS transport backend {% endcomment %}
<li>
Ensure that "Use the native Windows Secure Channel Library" is selected and click on "Next".
</li>
{% comment %} This should mean that people stuck behind corporate firewalls that do MITM attacks
with their own root CA are still able to access remote git repos. {% endcomment %}
{% comment %} Configuring the line ending conversions {% endcomment %}
<li>
Ensure that "Checkout Windows-style, commit Unix-style line endings" is selected and click on "Next".
</li>
{% comment %} Configuring the terminal emulator to use with Git Bash {% endcomment %}
<li>
<strong>
Ensure that "Use Windows' default console window" is selected and click on "Next".
</strong>
</li>
{% comment %} Configuring extra options {% endcomment %}
<li>
Ensure that "Default (fast-forward or merge) is selected and click "Next"
</li>
<li>
Ensure that "Git Credential Manager" is selected and click on "Next".
</li>
<li>
Ensure that "Enable file system caching" is selected and click on "Next".
</li>
{% comment %} Configuring experimental options {% endcomment %}
<li>Click on "Install".</li>
{% comment %} Installing {% endcomment %}
{% comment %} Completing the Git Setup Wizard {% endcomment %}
{% comment %} as of 2020-06-02, the Window will say "click Finish", but the button is labelled as "Next" {% endcomment %}
<li>Click on "Finish" or "Next".</li>
</ol>
</li>
<li>
If your "HOME" environment variable is not set (or you don't know what this is):
<ol>
<li>Open command prompt (Open Start Menu then type <code>cmd</code> and press <kbd>Enter</kbd>)</li>
<li>
Type the following line into the command prompt window exactly as shown:
<p><code>setx HOME "%USERPROFILE%"</code></p>
</li>
<li>Press <kbd>Enter</kbd>, you should see <code>SUCCESS: Specified value was saved.</code></li>
<li>Quit command prompt by typing <code>exit</code> then pressing <kbd>Enter</kbd></li>
</ol>
</li>
</ol>
<p>This will provide you with both Git and Bash in the Git Bash program.</p>
<h4>Video Tutorial</h4>
<div class="yt-wrapper2">
<div class="yt-wrapper">
<iframe type="text/html" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" src="https://www.youtube-nocookie.com/embed/339AEqk9c-8?modestbranding=1&playsinline=1&iv_load_policy=3&rel=0" class="yt-frame" allowfullscreen></iframe>
</div>
</div>
</article>
<article role="tabpanel" class="tab-pane" id="shell-macos">
<p>
The default shell in some versions of macOS is Bash, and
Bash is available in all versions, so no need to install anything.
You access Bash from the Terminal (found in
<code>/Applications/Utilities</code>).
See the Git installation <a href="#shell-macos-video-tutorial">video tutorial</a>
for an example on how to open the Terminal.
You may want to keep Terminal in your dock for this workshop.
</p>
<p>
To see if your default shell is Bash type <code>echo $SHELL</code>
in Terminal and press the <kbd>Return</kbd> key. If the message
printed does not end with '/bash' then your default is something
else and you can run Bash by typing <code>bash</code>
</p>
<p>
If you want to change your default shell, see <a href="https://support.apple.com/en-au/HT208050" rel="noopener">
this Apple Support article</a> and follow the instructions on "How to change your default shell".
</p>
<h4 id="shell-macos-video-tutorial">Video Tutorial</h4>
<div class="yt-wrapper2">
<div class="yt-wrapper">
<iframe type="text/html" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" src="https://www.youtube-nocookie.com/embed/9LQhwETCdwY?modestbranding=1&playsinline=1&iv_load_policy=3&rel=0" class="yt-frame" allowfullscreen></iframe>
</div>
</div>
</article>
<article role="tabpanel" class="tab-pane" id="shell-linux">
<p>
The default shell is usually Bash and there is usually no need to
install anything.
</p>
<p>
To see if your default shell is Bash type <code>echo $SHELL</code> in
a terminal and press the <kbd>Enter</kbd> key. If the message printed
does not end with '/bash' then your default is something else and you
can run Bash by typing <code>bash</code>.
</p>
</article>
</div>
</div>
</div>