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:
- Read the Wikipedia article on Git.
- Read the Wikipedia article on GitHub.
- Install Git from the Git Install page or using WinGet.
- Create an account on GitHub.
Further steps depend on the tool you use.
- Create a folder, with a short and appropriately chosen name.
- 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 as3.14. This will create the Git repository (which can be verified for the presence of the.gitfolder or bygit status) - Add NumPy and Matplotlib to the project with
uv add numpy matplotlib. This will create thevenvand install the packages. - Open the
.gitignorefile and check that the name of the virtual environment folder (assumed to be.venvin this case) is listed in that file. If not listed, add the word.venv/on a line by itself.
- 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. - Create a Python virtual environment (usually named
.venv) withpy -3.14 -m venv .venvassuming you are on Windows and have Python launcher installed. Otherwise usepython -m venv .venv. - Install NumPy and Matplotlib packages into the venv with
pip install numpy matplotlib. - Create a file named
.gitignorein the project directory using a text editor and add the words.venv/on a line by itself. - Activate the
venvwith.venv/Scripts/activate.
Continue with the following steps:
- Check the status of the local Git repo with
git status. - Check the Git log with
git log - Add a new file with the name
demo01.py, with the lineprint("Hello, world!")or any lines in it. Then check the status again. - Stage the file
.gitignorefor the next commit withgit add .gitignore. - Commit the staged files with `git commit -m "Added .gitignore to the repo". Check the status and log again.