Try making changes via branching
Branching and forking are same same but different. For us, both are basically different ways of contributing to the project without direct write access to lit/digizeit:master
(note this notation --- fork-name/repo-name:branch-name
. As I've said, you generally won't have write access to the master branch of projects, unless you are the founder/creator of such projects. This goes for both industry and open source contexts.
Forking involves, as we saw today, making a version of the whole project under your username instead of lit
. You then clone your fork, make changes, push them, and make a merge request from your-name/digizeit:master
to lit/digizeit:master
.
With branching, you don't need a fork at all. Instead, you 'checkout' a new branch, while staying within the same repository. Doing so copies your current branch (i.e. master) to a new workspace that you have given a useful name. You make whatever changes you like, and push this new branch to GitLab. You can then access it by the dropdown fox that says master by default. You can then make a merge request from lit/digizeit:your-branch-name
to lit/digizeit:master
.
One thing to note is that checking out involves your machine switching from one version of the repository to another. You therefore can't have uncommitted changes in one branch when you try to checkout another, because those changes would disappear. So you'll need to commit, discard/delete or stash changes before doing a checkout
operation.
See the CONTRIBUTING.md document in this repository's root directory for step by step instructions. Note the similarities between forking and branching. Try to think about why both of these things exist, when they end up doing more or less the same thing. Notice that you could even combine both workflows, i.e. forking, then checking out a new branch within your fork! Would you ever want to? When?
Once you can do this, you've learned all the git you need to build your own projects, or contribute to anyone else's project. Well done!
If you run into errors, post here or on #1 !