Update FPC fork lazarus / 62-General ---------------------------------------------------------------------- SymbolicFrank · 2022-09-27 13:51 I have an FPC fork on GitLab to create pull requests. How do I update that to the current FPC version? It isn't a paid account, so mirroring doesn't work. ---------------------------------------------------------------------- Thaddy · 2022-09-27 13:55 No not fork. No help required. Do you have a good reason for it? Better be a good one... ---------------------------------------------------------------------- SymbolicFrank · 2022-09-27 14:03 Well, I made it to make a pull request to fix my bug reports about a few problems with DBF files. Now it seems that I have to extend the TMSSQLConnection. I hope I don't have to make a new fork and configure the build environment again, it was a lot of work. I just want to update it (pull) to a copy of the current FPC repository. ---------------------------------------------------------------------- Martin_fr · 2022-09-27 14:10 Quote from: SymbolicFrank on September 27, 2022, 03:51:31 pmI have an FPC fork on GitLab to create pull requests. How do I update that to the current FPC version? It isn't a paid account, so mirroring doesn't work. And you have a clone of that fork on your local PC? Add the original FPC gitlab url as a 2nd remote to your local clone. Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i git remote add fpc http://...... (or use your git gui...) Then you can pull or "git remote update" from each remote. You can then push to your fork. For this you should have a local branch that "tracks" origin/main (assuming your fork remote is called "origin" / as is default / "git remote -v") The easiest is probably if that branch is NOT your work branch. That is if you committed your changes to "main" (local branch main) then you may use another name. Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i git switch -c fork-main --track  origin/maingit merge --ff-only fpc/maingit push  If the merge doesn't work: git stash push ; git switch -f -C fork-main fpc/main ; git stash pop Note, this form of git switch will not ask questions, it clears changes in your work tree, and move the branch, which in other scenarios can mean commits that are only on that branch are "kinda dropped". ---------------------------------------------------------------------- SymbolicFrank · 2022-09-27 14:17 Ah, in that way. Thanks, I'm going to try try that (very carefully ). Yes, the GitLab fork is for publishing the pull request, I have cloned it locally. ---------------------------------------------------------------------- Martin_fr · 2022-09-27 14:30 Quote from: SymbolicFrank on September 27, 2022, 04:17:19 pmAh, in that way. Thanks, I'm going to try try that (very carefully ). Yes, the GitLab fork is for publishing the pull request, I have cloned it locally. So long as you don't use -f or uppercase -C on git switch, it is all save. Uncommitted changes need to be stashed. Anything that is committed is save (as long you do not do: rm -rf .git). git keeps all commits for at least 2 weeks (by default) before it really gets rid of them (e.g. if you delete a local branch). And in many cases even longer. (something called a reflog) - not going into detail now, until anyone needs it. ---------------------------------------------------------------------- Arioch · 2022-09-27 14:43 Refer to the manuals for git program you have. Personally i use TortoiseGit on Window and almost enver use the command line But there are many other git clients, textual and graphic, so see which one is most comfortable to you, and then read sppecific instructions to it. Branching and merging are at the core of git process, and are described many places. If you are new to the very concept - i would suggets you to start with general (git-agonstic) https://en.wikipedia.org/wiki/Version_Control_by_Example Then after you learn branching and merging, i suggest you learn about cherry-picking specific commits form other branches. Sometimes it is helpful, albeit can also be more problematic, than full-branch merge. Again, learn it in general concepts in Git Book, and after that in specific buttons and windows in user manual for your git program, ---------------------------------------------------------------------- PascalDragon · 2022-09-28 07:33 Quote from: Thaddy on September 27, 2022, 03:55:41 pmNo not fork. No help required. Do you have a good reason for it? Better be a good one... Forks are normal when operating with Git repositories as they're required for merge requests