Welcome to NJC Basics for NJCCZ Students! This repository is designed to introduce you to use Github's Codespaces to share and store your files in repos and do some version control using Git.
- Creating a Codespace on the Repo
- Creating a Branch
- Making Changes In a Branch
- Commiting Changes
- Doing a Pull Request
- Additional Resources
- Contributing
- License
After logging in to your Github account,
-
navigate to your Github Codespaces
-
on the top right hand corner, click on
New codespace -
In the
Create new codespacepage,- Under repository, look for
beertino/NJCCZand select it - you can leave the rest of the options to default
- Click on
Create Codespace
- Under repository, look for
- On the left hand navigation panel, click on the source control icon (icon below the magnifying glass icon). In the source control pane (the bottom left panel), right click on the latest commit and choose
Create Branch. - Enter a name for your branch which is a new/separate version of the main repository. Ideally, the name is short and describe the main functionality of your branch
Now that you are in a branch, you can make changes to your copy of the repository without changing anything in the main repository.
- On the left hand navigation panel, click on the papers icon ( the top one) to go back to the repository folders.
- For the purpose of this exercise, go under
2025folder and create a.txtfile there - Name the text file with your name and write down a hobby in the file.
- Go back to the source control panel.
- Enter the message in the textbox describing the changes made, e.g.
added my_name.txt - Click on
Commit - Choose
Yeswhen prompted about staging all the changes. - Click on
Publish Branch - If there's a notification to run
git fetchperiodically, chooseYes.
"Git commit" is a command that essentially takes a snapshot of the currently staged changes in your project, saving them as a permanent part of your repository history, effectively acting like a "save point" where you can track changes made to your code over time; it records who made the changes, when they were made, and includes a descriptive message about what was modified.
In Git, "publishing a branch" means to send a local branch you created on your computer to a remote repository like GitHub, making it accessible to other team members so they can see, collaborate on, and review your work; essentially, it's the act of sharing your branch with others on the project.
- Click on the pull request icon, the one below Github icon
- Choose the correct base, in this case
beertino/mainand the branch to merge, in this case should be sth of the form<your_github_name>/<your_branch_name> - Add some textual description in the box
- Click
Create - Now, you wait until the request is approved or rejected.
A pull request is a proposal to merge a set of changes from one branch into another. In a pull request, collaborators can review and discuss the proposed set of changes before they integrate the changes into the main codebase.
Happy coding and enjoy using Codespaces and Git!



