Git Workshop 1
Level 2: Making your first repository
Step 0: Ensure you’re logged into codeberg
Step 1: Prepare to create a new repository
As a general rule of thumb,
+symbol usually indicates that something can be created and ✏symbol indicates that something can be edited!
Ensure you’re logged in as the correct user!
Step 2: Describe and Create your Repository
Some suggestions:
- Be descriptive and clear
- Good: customer-support-app
- Bad: repo-new
- Use lowercase
- Good: my-project
- Bad: My-Project
- Use hyphens as separators (slug-case)
- Good: my-project
- Bad: my_project
- Avoid special characters
- Use only letters, numbers, and hyphens
- Keep it short and concise
- Shorter names are easier to remember
- Avoid version numbers
- Use tags for versions (e.g., v1.0.0)
- Bad: invoice-generator-v2
- We will have ample opportunities to version our code with branches and tags!
Optionally, make repository private. This means that your friends cannot see your work! That wasn’t very Open Source of you >:(
Add an appropriate description to convey what your repo does
remember to select this for the next step!
Remember to create your repository!
Step 3: Edit your first file: README.md
This is the file most people see when they first view your repository, even non programmers. This should contain a good introductory piece of documentation for what your repo/code does, how to use it, etc. Ensure this is professional and good!
Step 4: Saving your file using Commits
With git, we use “commits” to track changes. Each commit(a snapshot of the repository) has a change title, description, and a hash ID. This makes code management for non-insignificant projects very simple!
Most git services and git cli provide(s) a diff-like view that shows changes in a before-after form side-by-side.
Remember to add a descriptive and relevant commit message here!
Remember to actually finish committing your changes! You can check the history tab afterwards to see what your commit changed!