Forum > Linux

Is it possible to do git pull?

(1/1)

cdbc:
Hi
As the title says, is it possible to do a 'git pull origin main' when I'm standing in my 'Lazarus' directory, created by 'FpcUpDeluxe' during install?!?
Thus getting the newest sources for lazarus, without having to do a new install with fpcupdeluxe. I mean, git pull -> apply my own patches and the just recompile lazarus... Wouldn't that be nice  :D
'git status' shows me the four patches, because I haven't committed them...
Regards Benny

Fred vS:
Hello.

This works here:
For Lazarus:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---$ cd /home/fred/fpcupdeluxe/lazarus/$ git pull --all> Fetching origin   Already up to date.For fpc:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---$ cd /home/fred/fpcupdeluxe/fpcsrc/$ git pull --all>Fetching originremote: Enumerating objects: 7253, done.remote: Counting objects: 100% (2378/2378), done.remote: Compressing objects: 100% (268/268), done.remote: Total 7253 (delta 2175), reused 2220 (delta 2107), pack-reused 4875 (from 1)Receiving objects: 100% (7253/7253), 7.35 MiB | 2.89 MiB/s, done.Resolving deltas: 100% (4801/4801), completed with 394 local objects.From https://gitlab.com/freepascal.org/fpc/source   22da36f83e..57e84ef714  fixes_3_2            -> origin/fixes_3_2   159d97e864..f429dab7b3  main                 -> origin/main   ba34a5fe2c..cd84c2d5cd  release_3_2_4-branch -> origin/release_3_2_4-branch * [new branch]            rtti-thunk-no-global-label -> origin/rtti-thunk-no-global-labelUpdating 22da36f83e..57e84ef714 

TRon:

--- Quote from: cdbc on December 09, 2024, 11:45:55 pm ---.. without having to do a new install with fpcupdeluxe.

--- End quote ---
Dumb question perhaps but why is there FPCUpDeluxe in that equation ? How would you test your patches otherwise ? Pull, apply, build... and if you so must then install. No FPCUpdeluxe required.

Warfley:
You can easily update any lazarus installation using git. Even lazarus installations you installed, e.g. through an installer (also on windows)

If your lazarus directory is not yet a git directory, first initialize git (skip if it's already a git repository):

--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---git initgit remote add origin https://gitlab.com/freepascal.org/lazarus/lazarus.gitNow you can fetch the all the new branches and versions:

--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---git fetch --allIf you want to change from a stable version to another stable version, you can switch the branch. E.g. if you want to update form the current version (e.g. 3.6) to 4.0rc1:

--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---git reset --hard tags/lazarus_4_0_RC_1git checkout tags/lazarus_4_0_RC_1If instead you are already on main/trunk but just want to update to the newest commit just do:

--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---git reset --hard origin/mainNote, the reset resets all changes, if you want to save them do a stash before

--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---git stash# reset and/or checkoutgit stash pop
Now your directory is on the desired version you can rebuild:

--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---make cleanmake lazbuild PP=$(realpath ../fpc/bin/fpc) # change to fpc.sh for fpcup installation./lazbuild --build-ide=Note that you must choose the correct path for the make lazbuild. If you use the system fpc you don't need to add any PP=..., if you have a custom fpc installation choose that one. FPCUp usually installs fpc as fpc.sh into the parent folders fpc/bin

This is actually how I update pretty much all of my lazarus installations, including on windows where I installed them with the windows installer.

Navigation

[0] Message Index

Go to full version