Git Workshop 1 -> Level 2: Making a Repository (Route B: Codeberg)

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!

image image

Ensure you’re logged in as the correct user! image

Step 2: Describe and Create your Repository

Some suggestions:

  1. Be descriptive and clear
    • Good: customer-support-app
    • Bad: repo-new
  2. Use lowercase
    • Good: my-project
    • Bad: My-Project
  3. Use hyphens as separators (slug-case)
    • Good: my-project
    • Bad: my_project
  4. Avoid special characters
    • Use only letters, numbers, and hyphens
  5. Keep it short and concise
    • Shorter names are easier to remember
  6. 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!
image

Optionally, make repository private. This means that your friends cannot see your work! That wasn’t very Open Source of you >:(

image

Add an appropriate description to convey what your repo does

image

remember to select this for the next step!

image

Remember to create your repository!

image

Step 3: Edit your first file: README.md

image image

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!

image image image

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! image

Remember to actually finish committing your changes! You can check the history tab afterwards to see what your commit changed!

image
Licensed under CC BY-NC-SA 4.0
Built with Hugo
Theme Stack designed by Jimmy