Forum > General

Branches

(1/6) > >>

SymbolicFrank:
Say, you fixed some bugs and extended the functionality in some core packages. You report it on the bugtracker, but the priority is too low for it to be incorporated. So, you have a folder that contains not only the changed files, but also the ones it needs to compile.

After a while, the functionality of other files that have something to do with it changes in trunk. What do you do? Add all the needed files to your own branch until it compiles? Make patches for everything and run those after installing a new version?

Martin_fr:
If you create your own git clone of the lazarus repo, then you can create your own branch.

That branch can then act as if it was a (series of) patch(es).
If upstream changes, you can rebase your branch.

rebasing, applies the individual commits as patches on the new target (new target = new upstream).

Most of the times, that works without conflicts. Of course if the same line is changed upstream, then you need to edit the file during the rebase.

As a side effect, if you have your changes in a branch on a cloned repo => then you can submit it as pull/merge-request. Making it easier to be incorporated.

If you do, duplicate the branch. If you rebase the branch, that also is a merge request, that makes the merge request harder to read.

If there are several individual changes/fixes, then ideally have them as individual commits. Helps to review them.

SymbolicFrank:
Ok. How do I create a merge request from the branch of my clone/fork to main? Gitlab doesn't like that.

Thausand:

--- Quote from: SymbolicFrank on July 05, 2022, 10:50:26 am ---Ok. How do I create a merge request from the branch of my clone/fork to main? Gitlab doesn't like that.

--- End quote ---

https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html

When you work in a fork

You can create a merge request from your fork to contribute back to the main project.


* On the top bar, select Menu > Project.
* Select your fork of the repository.
* On the left menu, go to Merge requests, and select New merge request. (*)
* In the Source branch drop-down list box, select the branch in your forked repository as the source branch.
* In the Target branch drop-down list box, select the branch from the upstream repository as the target branch. You can set a default target project to change the default target branch (which can be useful if you are working in a forked project).
* Select Compare branches and continue.
* Select Submit merge request.
(*) have good look for not press up button merge request and use down merge request button. Up is merge own repository down is merge remote (upstream) repository

Oh I forgot say: when merge created then gitlab write need verify with credit card else get red cross for pipeline. Can ignore, it work  :)

SymbolicFrank:
I did that (three times by now). The problem arises at step 5, where I cannot select the FPC/FPC Source repository. The only option for the target project is my own. I can fill in whatever I want, it gets ignored.

On second thought: it might be because I cloned it. I see there is a separate "fork" button. Can I fix that?

Navigation

[0] Message Index

[#] Next page

Go to full version