Development Environment Set Up: Git
Due Friday before class
Objective
to get your development environment set up for future classwork
Part 0: Choose Your Text Editor
You'll use a simple text editor to write Java programs. A text editor is for writing plain text documents, i.e., no different fonts, formats, etc. (We'll use an IDE later.) You will also use a text editor to write your commit messages in git (see below). The text editor you use for each task does not need to be the same.
Some options: emacs, vim, Pulsar (a fork of Atom), jEdit (written in Java), Notepad, VSCode (but this adds a lot of bells and whistles that I don't want you to use yet). Play around and see what you like.
Part 1: Install and Set Up Git
You'll learn more about git soon, but for now, know that git is a commonly used version control system that we'll use this term.
- If you plan to use only the lab machines, you can skip this
step. On Mac or Linux, Git may already be installed. Follow the
instructions
here: Download
and install Git
On Windows, there are some settings you should set to work well with other platforms and it comes with a program called Git Shell that you can use to enter the commands below (you can also install a Linux on Windows with WSL!) - Within your terminal/shell, configure Git for your
computer (note, these commands only need to be done once for
each computer you want to use git on). Replace the information
as appropriate.
git config --global user.name "YOUR NAME"
git config --global user.email "YOURUSERID@mail.wlu.edu"I will use the terms terminal and shell interchangeably.
- When commiting, git automatically opens an editor to write/save
the commit messages. It seems that most systems are defaulting to
using
vim
for the editor, which many of you probably don't know and it has a learning curve--but you definitely can learn it. It is popular with developers, and there are a bunch of tutorials and resources. You can even play a game to learn vim (after consulting the other resources first). If you want to change the editor that is used for git, see these examples. Beyond those examples, you can probably find examples for other text editors, e.g., for Pulsar.
Creating Your GitHub Account
Get a GitHub account if you don't have one already.
Set up Your GitHub Account: Personal Access Token (classic)
Create a personal access token (classic) in the GitHub web interface.
- You can set the expiration to be the end of the term or to never expire.
- Set the scopes to all of
repo
. - Save your token somewhere! You can't retrieve it again after it has been generated. You can create a new one, though.
Submitting your assignment
No submission. This is just on your honor that you do it, so that you're prepared for future work.