Skip to content

Latest commit

 

History

History
191 lines (186 loc) · 9.3 KB

setup.md

File metadata and controls

191 lines (186 loc) · 9.3 KB
layout title permalink
page
Setup
/setup/

The Bash Shell

Bash is a commonly-used shell that gives you the power to do tasks more quickly.

  1. Download the Git for Windows installer.
  2. Run the installer and follow the steps below:
      {% comment %} Git 2.29.1 Setup {% endcomment %}
    1. 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.
    2. From the dropdown menu, "Choosing the default editor used by Git", select "Use the Nano editor by default" (NOTE: you will need to scroll up to find it) and click on "Next".
    3. {% comment %} Adjusting the name of the initial branch in new repositories {% endcomment %}
    4. 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 %}
    5. {% comment %} Adjusting your PATH environment {% endcomment %}
    6. 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.)
    7. {% comment %} Choosing the SSH executable {% endcomment %}
    8. Select "Use bundled OpenSSH".
    9. {% comment %} Choosing HTTPS transport backend {% endcomment %}
    10. Ensure that "Use the native Windows Secure Channel Library" is selected and click on "Next".
    11. {% 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 %}
    12. Ensure that "Checkout Windows-style, commit Unix-style line endings" is selected and click on "Next".
    13. {% comment %} Configuring the terminal emulator to use with Git Bash {% endcomment %}
    14. Ensure that "Use Windows' default console window" is selected and click on "Next".
    15. {% comment %} Configuring extra options {% endcomment %}
    16. Ensure that "Default (fast-forward or merge) is selected and click "Next"
    17. Ensure that "Git Credential Manager" is selected and click on "Next".
    18. Ensure that "Enable file system caching" is selected and click on "Next".
    19. {% comment %} Configuring experimental options {% endcomment %}
    20. Click on "Install".
    21. {% 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 %}
    22. Click on "Finish" or "Next".
  3. If your "HOME" environment variable is not set (or you don't know what this is):
    1. Open command prompt (Open Start Menu then type cmd and press Enter)
    2. Type the following line into the command prompt window exactly as shown:

      setx HOME "%USERPROFILE%"

    3. Press Enter, you should see SUCCESS: Specified value was saved.
    4. Quit command prompt by typing exit then pressing Enter

This will provide you with both Git and Bash in the Git Bash program.

You already have bash or zshell installed as part of macOS and can use that for learning the Unix shell.

The default shell is usually Bash and there is usually no need to install anything.

To see if your default shell is Bash type echo $SHELL in a terminal and press the Enter key. If the message printed does not end with '/bash' then your default is something else and you can run Bash by typing bash.

{% comment %} Git Setup instructions rely on Shell instructions. If you don't include Shell instructions as part of your workshop website, make sure to adjust the text below accordingly. {% endcomment %}

Git

Git is a version control system that lets you track who made changes to what when and has options for easily updating a shared or public version of your code on GitLab. You will need a web browser.

You will need an account at the UW GitLab instance for parts of the Git lesson. An account should be provisioned for you when you log in with your netid. See the Gitlab Knowledgebase for additional information about setting up an account.

Git should be installed on your computer as part of your Bash install (see the Shell installation instructions).

Please open the Terminal app, type git --version and press Enter/Return. If it's not installed already, follow the instructions to Install the "command line developer tools". Do not click "Get Xcode", because that will take too long and is not necessary for our Git lesson. After installing these tools, there won't be anything in your /Applications folder, as they and Git are command line programs. For older versions of OS X (10.5-10.8) use the most recent available installer labelled "snow-leopard" available here. (Note: this project is no longer maintained.) Because this installer is not signed by the developer, you may have to right click (control click) on the .pkg file, click Open, and click Open in the pop-up dialog.

If Git is not already available on your machine you can try to install it via your distro's package manager. For Debian/Ubuntu run sudo apt-get install git and for Fedora run sudo dnf install git.