This is a quick-start guide for new developers and not meant to be an exhaustive git/GitLab tutorial, in any way.
General git Setup
You only need to do this once.
Configure your name and email:
wget2 Setup
You only need to do this once.
- Fork the upstream via GitLab interface
- Clone your fork:
- Add upstream repository:
- Build
wget2 as explained in README
WARNING: Never commit to branch 'master' or you likely mess up things.
Development
You'll do this periodically. :)
-
Pick an issue from Issues or
-
Create new issue if you want to add a new feature
-
For said issue/feature create a new branch:
$ git checkout -b <branch_name>
-
Make your changes using IDE/text editor of your choice.
Keep up with the coding style that you find, that basically is kernel coding style.
-
Confirm your changes by building wget2 as explained in README
Sample build:
$ ./bootstrap
$ ./configure --enable-manywarnings --disable-silent-rules --enable-assert
$ make check
-
git add and git commit your changes:
$ git add <modified_files>
$ git commit
Make sure that your commit message is GNU style (see git log for examples).
-
Push your changes to your fork:
$ git push origin <branch_name>
-
Create a Merge Request (https://gitlab.com/<gitlab_username>/wget2/merge_requests/new) to merge your changes with the upstream
-
Repeat steps 4, 5, 6 & 7 if more changes are requested.
Since you are working on your own repository called 'origin', feel free to make any changes to your branch.
You may delete and change commits like you want and then pushing them to GitLab with git push -f. This overwrites the history there as well - and that is what you want. If you already made a Merge Request (MR), GitLab will automatically update it for you. There is no need to close a MR and open a new one. Even the Continuous Integration (CI) will start again with your changes.
-
Delete the local branch and remote branch once your changes get merged:
$ git branch -d <branch_name>
$ git push origin --delete <branch_name>
-
Go to step 1
Syncing Your Fork
You need to do this periodically.
-
Fetch code from upstream:
$ git fetch upstream --prune
-
Switch to master branch:
$ git checkout master
-
Merge the code fetched from upstream:
$ git merge --ff-only upstream/master
-
Push the merged code to your fork:
$ git push
Documentation