Skip to content

Task 7

Created: 2026-04-21

Preamble

Source Code Management (SCM) is an important skill to master for a software deloper and anyone interested in tracking changes made to a document. Git is a popular SCM tool every software developer must learn.

See the section Source Code Management in the Resources section of this site to learn to use this tool.

Here are the tasks to complete:

  1. Read the Wikipedia article on Git.
  2. Read the Wikipedia article on GitHub.
  3. Install Git from the Git Install page or using WinGet.
  4. Create an account on GitHub.

Further steps depend on the tool you use.

  1. Create a folder, with a short and appropriately chosen name.
  2. Change into the project folder and initialize a project with uv init --python <PYTHON>, where <PYTHON> is the Python version you wish to use, such as 3.14. This will create the Git repository (which can be verified for the presence of the .git folder or by git status)
  3. Add NumPy and Matplotlib to the project with uv add numpy matplotlib. This will create the venv and install the packages.
  4. Open the .gitignore file and check that the name of the virtual environment folder (assumed to be .venv in this case) is listed in that file. If not listed, add the word .venv/ on a line by itself.
  1. Create a folder, with a short and appropriately chosen name, on your machine. Then change into the folder and initialize a Git repository with git init. This will initialize a Git repository in the project folder.
  2. Create a Python virtual environment (usually named .venv) with py -3.14 -m venv .venv assuming you are on Windows and have Python launcher installed. Otherwise use python -m venv .venv.
  3. Install NumPy and Matplotlib packages into the venv with pip install numpy matplotlib.
  4. Create a file named .gitignore in the project directory using a text editor and add the words .venv/ on a line by itself.
  5. Activate the venv with .venv/Scripts/activate.

Continue with the following steps:

  1. Check the status of the local Git repo with git status.
  2. Check the Git log with git log
  3. Add a new file with the name demo01.py, with the line print("Hello, world!") or any lines in it. Then check the status again.
  4. Stage the file .gitignore for the next commit with git add .gitignore.
  5. Commit the staged files with `git commit -m "Added .gitignore to the repo". Check the status and log again.