CSci 23 - 01 LT3 Creating a Git Repository
CSci 23 - 01 LT3 Creating a Git Repository
If a text is in orange, then it is a link. A blue text should be typed as is. Then all red texts should be replaced
by the expected value. Just ensure that you typed in without misspellings.
Software projects, big or small, need proper management to track progress and changes. This
learning task covers tools that help simplify maintaining and scaling software projects, which are
essential skills as a software developer. Think of them as good running shoes—they help you go faster
and farther. A good computer and internet are required in this learning task.
○ In the Add new SSH Key page, enter the DCSTPC as the title.
○ Paste your ssh-ed25519 key generated above.
○ Click the Add SSH key button.
4. Go back to Command Prompt. (Do not replace the %USERNAME% part.)
○ Open the SSH folder: cd "C:\Users\%USERNAME%\.ssh"
○ Create a config file: type nul > config
○ Open the config file: start config
i. Open with Notepad/Notepad++
○ Copy the text to the config file.
Host github.com
User git
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_ed25519
Port 443
○ This config file is a workaround for SSH-based Git operations (clone, push, and pull)
even in restricted networks, by forcing connections to port 443 when port 22 is blocked
by the network administrator.
○ Save your changes
While git lets you manage a project, SSH on the other hand is like a “secret handshake” that
only you (client) and another person (server) know, so whenever you communicate, you’ll know that no
one else can snoop over secure conversations. This is usually done once on every computer, basically,
once for your computers at school, at home, and elsewhere.
GitHub Repository
Git is a program used to manage your projects while GitHub is a service (website) where you
can store your projects online. It is one of the many online services that allows its users to create,
manage, and share projects with their collaborators or to the public (Bell et al., 2014; Pipinellis, 2015).
It is not only used in programming, but it is also used in fields like engineering and other applied fields
(Getting Started with Git, 2024). While this is used practically use by real-world projects, you can also
use GitHub to manage and store your mini-projects. So, your revisions remain accessible and
lightweight without the need of larger disk space.
You just need to run a command to generate a pair of large numbers—your private and public
keys—that are easy to create but hard to crack (Bider, 2018; Silverman et al., 2005). Keep your private
key secure and only share your public key with trusted servers like GitHub for safe communication
over the internet. When you access GitHub using git, it will then verify your identity through a
mathematical challenge based on your public key—but this happens in the background. Cool, right?
In analogy, the internet is a large and interconnected public highway, GitHub is a secure
warehouse, your computer is your virtual office, git is your swift messenger, and SSH is your trusty
bodyguard. If you have a confidential project and you need to securely transport it through a public
highway all the way to a distant warehouse, you need a fast messenger and a reliable bodyguard. That
is how all those things interact. Do you understand it better now?
The point here is that even if you choose to store your data online for convenience, you should
remain as the sole owner of your data and you are the only person that should decide who will be able
to see, read, or modify it.
2. Under the Create a new repository webpage, fill up the following information.
a. Repository name (lowercase): company
b. Description: A corporate website for Company Name.
c. Select the Private option.
Pushing Changes
For every project, create its own git repository. Then create a local copy in your computer using
the git clone command. Each time you have successfully completed a task, you add, commit, and
push all your changes to GitHub (Pushing Commits to a Remote Repository, 2024). What happens
under-the-hood is complex, but in simpler terms, git takes note of the specific changes that you made
and use this information to track it and recover older versions. Without running add, commit, and push
your changes are just temporary and prone to loss.
## [1.0.0] - yyyy-mm-dd
### Added
- New `CHANGELOG.md` file for tracking purposes.
4. After updating the file, push your changes to the remote repository.
a. Stage all changes: git add .
b. Commit all staged changes: git commit -m "Add project to GitHub"
c. Push commits to GitHub: git push -u origin main
d. Screenshot the outputs in the Command Line (for email attachments).
e. Clear the screen: cls
5. Create new branches in your repository.
a. Create the dev branch: git switch -c dev
b. Push the dev branch: git push origin dev
c. Create the beta branch: git switch -c beta
d. Push the beta branch: git push origin beta
e. Create the stable branch: git switch -c stable
f. Push the stable branch: git push origin stable
g. Switch back to main branch: git switch main
h. Screenshot the outputs in the Command Line (for email attachments).
i. Clear the screen: cls
6. Once done, submit it to your instructor via email.
a. Attach the screenshots in the email.
To: [email protected]
Subject: [2025-mm-dd] CSci 23 LT3 Surname
Sir Rodney,
Good day!
I am Juan D. Cruz (student #) of your CSci 23 class. Attached are the screenshots for your reference.
Below is the link to my GitHub repository.
https://github.com/username/company
Best regards,
Juan D. Cruz
BSCS-2
7. Ensure proper submission for grading; confirm with your instructor if needed.
8. Delete all your files and empty the Recycle Bin.
9. Close the browser, Command Prompt, and other windows.
10. Shutdown the PC and make sure the AVR/UPS is turned off.
11. Arrange the chairs before leaving.
Summary
In this Learning Task, you learned about the relationship between the internet, your computer,
GitHub, git, and SSH. Using these tools, you can successfully create and manage projects like a pro!
Next time, we will use this learned knowledge and skills when creating new projects.
References
Bell, P., & Beer, B. (2014). Introducing GitHub: A Non-Technical Guide. O’Reilly Media, Inc.
Bider, D. (2018). Use of RSA Keys with SHA-256 and SHA-512 in the Secure Shell (SSH) Protocol (Request
for Comments RFC 8332). Internet Engineering Task Force. https://doi.org/10.17487/RFC8332
Chacon, S., & Straub, B. (2014). Git on the server – Setting up the server. In Pro Git (2nd ed.). Apress. ISBN
978-1484200773.
Silverman, E., & Byrnes, R. (2005). SSH: The Secure Shell (The Definitive Guide) (2nd ed.). O'Reilly.
Torvalds, L. (2005). Initial revision of “git”, the information manager from hell [Commit message]. GitHub.
https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23ca2e25604af290
Getting started with Git. (2024). GitHub Docs. Retrieved April 8, 2024, from https://docs.github.com/en/get-
started/getting-started-with-git
Git Cheatsheet. (2024). GitHub Docs. Retrieved April 8, 2024, from https://docs.github.com/en/get-
started/getting-started-with-git/git-cheatsheet