Key Points
What is Git/Codeberg?
- Version control helps track changes to files and projects
- Git and Git hosting platforms like Codeberg are not the same
Getting started with Git
- When you initialize a Git repository in a directory, Git starts tracking the changes you make inside that directory.
- This tracking creates a history of the way the files have changed over time.
- Git uses a two-step process to record changes to your files. Changes to files must first be added to the staging area, then committed to the Git repository.
Sharing your work
- remote repositories on Codeberg help you collaborate and share your work
-
pushis a Git verb for sending changes from the local repository to a remote repository -
pullis a Git verb for bringing changes from a remote repository to the local repository -
diffis a Git verb for viewing the difference between an edited file and the file’s most recent commit
Review
- the language of Git can be confusing and intimidating
- rephrasing commands and drawing concepts can clarify Git’s workflow
Codeberg Pages
- Codeberg Pages publishes the
pagesbranch of a public repository as a website that is version controlled and accessible for collaboration - Codeberg Pages serves files as they are; Markdown needs to be converted to HTML first, for example by a static site generator
- Collaborating on a Codeberg Pages website uses the same Git/Codeberg workflow you learned for collaborating via a Codeberg repository