The Codeberg Documentation website is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
It bundles third-party font software licensed under a different license. Please look at the LICENSE file for details.
Changes to the original versions of the article as well as its individual authors can be looked up in this article's commit history
Codeberg and the Codeberg Logo are trademarks of Codeberg e.V.
As shown before, cloning, editing, committing, pushing and pulling can be performed using Git directly from the command line. This time, we're going to do this all through the web interface.
The user in these examples is knut
the polar bear and its repository is foobar
. The repository was created via the Codeberg website including a README.md
file.
Cloning refers to the process of creating an identical copy of an online repository to the local machine.
Copy the repo URL from the Codeberg website to your Git client using the Copy
icon.
If you want to download a copy of a specific state of the repository without its version history, click on the Download Repository
icon to download either as ZIP or TAR.GZ.
Click on the file you want to edit from the list of files in the repo. Let's try it here with the README.md
file.
The pencil tool (Edit File
) will open a new window.
Here, you can edit the file as you wish.
The Preview
tab shows you how the file will look like when rendered, and Preview Changes
will highlight the changes you've made to the file (red for deletions and green for additions).
A commit is a record of your changes to the repository. This is like a snapshot of your edits.
The commit section is at the bottom of the edit window:
A commit requires a commit message. A default message is added, but do not hesitate to edit it. Make sure your commit message is informative, for you, your collaborators and anyone who might be interested in your work. Some advice on how to write a good commit message can be found on countless websites and blogs!
If you intend to start a pull request with this commit, you should choose the option Create a new branch for this commit and start a pull request
. This will make it easier to work on the different commits without mixing them if they are in different forks. Check the documentation on Pull requests and Git flow for more details.
Submit your changes by clicking on Commit Changes
.
Synchronizing the modifications (commit) from the local repository to the remote one on Codeberg is called pushing.
Pulling synchronizes the modifications (commit) from the remote repository on Codeberg to the local one. Pulling is important when you're working on different computers, to make sure that all computers are on the same page. It's even more important when you have collaborators on a project; they may change the files as well, so you need to pull these modifications before you start working. Because of this, it's recommended to pull before pushing.
Pushing and pulling only make sense if you work locally. This is why there is no "push" or "pull" button on the Codeberg web interface; committing here already pushes to the remote repository on Codeberg, and there is therefore nothing to pull (except pull requests of course).
Hey there! 👋 Thank you for reading this article!
Is there something missing, or do you have an idea on how to improve the documentation? Do you want to write your own article?
You're invited to contribute to the Codeberg Documentation at its source code repository, for example, by adding a pull request or joining in on the discussion in the issue tracker.
For an introduction on contributing to Codeberg Documentation, please have a look at the Contributor FAQ.
© Codeberg Docs Contributors. See LICENSE