Sign in Join
Wiki copytemporary

FPC git: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Git setup
22
33### Git repository location
44
55The Git repositories are hosted on Gitlab:
66
77FPC compiler, RTL, packages and utils are located here:
88
99
1010[<https://gitlab.com/freepascal.org/fpc/source>](https://gitlab.com/freepascal.org/fpc/source)
1111
1212The URL to clone the repository is:
1313
1414
1515[<https://gitlab.com/freepascal.org/fpc/source.git>](https://gitlab.com/freepascal.org/fpc/source.git)
1616
1717 git clone https://gitlab.com/freepascal.org/fpc/source.git
1818
1919The Documentation Git repository is here:
2020
2121
2222[<https://gitlab.com/freepascal.org/fpc/documentation>](https://gitlab.com/freepascal.org/fpc/documentation)
2323
2424The URL to clone the documentation repository is:
2525
2626
2727[<https://gitlab.com/freepascal.org/fpc/documentation.git>](https://gitlab.com/freepascal.org/fpc/documentation.git)
2828
2929 git clone https://gitlab.com/freepascal.org/fpc/documentation.git
3030
3131The website Git repository is here:
3232
3333
3434[<https://gitlab.com/freepascal.org/fpc/website>](https://gitlab.com/freepascal.org/fpc/website)
3535
3636The URL to clone the website repository is:
3737
3838
3939[<https://gitlab.com/freepascal.org/fpc/website.git>](https://gitlab.com/freepascal.org/fpc/website.git)
4040
4141 git clone https://gitlab.com/freepascal.org/fpc/website.git
4242
4343### Your identity in git
4444
4545In order for your commits to be recognized, please configure your local (or better yet, global) git installation to use the address linked to your gitlab acccount.
4646
4747 git config --global user.email your.email.user@youremail.host
4848
4949This will set your email address for all git repositories you use, and will allow the gitlab interface to correctly link commits to users in its HTML interface.
5050
5151If you have multiple gitlab (or even github) accounts, you may prefer to set this email only locally:
5252
5353 git config --local user.email your.email.user@youremail.host
5454
5555this command must be execute in a particular repository, and sets the email address for only that repository.
5656
5757### HTTP access and credentials
5858
5959If you access the repository using HTTPS, by default, git will ask for the username/password. you can tell git to store them permanently, issue the following command:
6060
6161 git config --global credential.helper store
6262
6363There are other possibilities for storing this info. More info can be found on
6464
6565
6666[<https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage>](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage)
6767
6868### Using access tokens
6969
7070You may want to use an access token and HTTPS access, it has some advantages. This is supported by most modern git clients:
7171
7272
7373[<https://knasmueller.net/gitlab-authenticate-using-access-token>](https://knasmueller.net/gitlab-authenticate-using-access-token)
7474
7575and here you can see how to do this on gitlab:
7676
7777
7878[<https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html>](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html)
7979
8080The advantage of using an access token is that it can be given limited rights on gitlab, for example only accessing a repository. This also means you can easily enable 2FA for your gitlab account.
8181
8282### Git mirror on GitHub
8383
8484The GitLab repositories are mirrored on [GitHub](https://github.com/fpc/). Cloning of the sources can be done with the following command
8585
8686 git clone https://github.com/fpc/FPCSource.git fpc
8787
8888and for documentation:
8989
9090 git clone https://github.com/fpc/FPCDocumentation.git fpcdocs
9191
92-In case you want to submit patches (pull requests) it is <em>strongly recommended</em> to use GitLab instead.
92+In case you want to submit patches (pull requests) it is strongly recommended to use GitLab instead.
9393
9494## Branching model
9595
9696In a first stage, the branching model as used in Subversion will be used: fixes done in trunk, and later cherry picked to the fixes branch.
9797
9898At a later stage, the branching model may be changed into one of the many git branching schemes.
9999
100100## Windows Git clients
101101
102102On macOS, Linux & BSD, the git command is installed with the system package manager (you must install XCode command line tools on macOS). On Windows, a separate git client must be installed. There are many available, but the following are popular ones:
103103
104104- Git for windows: a command-line client with a bash shell, so you can copy & paste commands you find on internet:
105105
106106
107107[<https://gitforwindows.org/>](https://gitforwindows.org/)
108108
109109- TortoiseGit integrates with the Windows explorer, much like TortoiseSVN does:
110110
111111
112112[<https://tortoisegit.org/>](https://tortoisegit.org/)
113113
114114if you already have TortoisSVN installed, both can work side-by-side.
115115
116116- Sourcetree is a free client for Windows and macOS:
117117
118118
119119[<https://www.sourcetreeapp.com/>](https://www.sourcetreeapp.com/)
120120
121121It is made by the people from bitbucket.
122122
123123- Smartgit runs on Windows, Linux and macOS:
124124
125125
126126[<https://www.syntevo.com/smartgit/>](https://www.syntevo.com/smartgit/)
127127
128128- The VSCode and Atom editors have git support built in.
129129
130130## Concepts and SVN to GIT differences
131131
132132A few "good to know" differences: [[FPC git concepts]].
133133
134134## Common SVN operations in Git
135135
136136### Check out
137137
138138To check out a new copy of a repository is called 'cloning' in git.
139139
140140 git clone https://gitlab.com/freepascal.org/testconversion
141141
142142As in subversion, you can give it another name:
143143
144144 git clone https://gitlab.com/freepascal.org/testconversion myconversion
145145
146146This operation can take a while, the FPC source base is large.
147147
148148### Update
149149
150150To update your source code with the changes in the remote repository, is called 'pulling' in git:
151151
152152 git pull
153153
154154Note that in difference with subversion, git always updates the whole repository.
155155
156156> **Note:** While git will fetch and apply changes to all *remote* branches with this command, of all *local* branches it will only update the one that's currently checked out (see [[FPC git|ls (listing branches)]] for more information about remote/local branches). To update other local branches, you have to [[FPC git|switch]] to them and either execute `git pull` again, or rebase/merge (will be documented once we decide which strategy to use).
157157
158158To keep a commit history which is as linear as possible and avoids merge commits, it is recommended to do a rebase when you pull.
159159
160160 git pull --rebase
161161
162162You can make the use of rebase for every pull the default by executing:
163163
164164 git config pull.rebase true
165165
166166### Resolve
167167
168168If you have conflicts in svn after updating or merging, you fix the conflicts and then tell svn everything is fine with the *resolved* command.
169169
170170In git, conflicts generally occur when [[FPC git|merging]] or when applying [[FPC git|shelved/stashed]] changes.
171171
172172When conflicts occur, then
173173
1741741. Changes to files that are not in conflict, will be [[FPC git|staged]]
1751752. Changes to files that do conflict will be applied without staging to the working copy (so that a plain [[FPC git|diff]] will only show conflicting changes)
176176
177177To resolve conflicts,
178178
1791791. If you want to commit the resolved version of the file, mark it as resolved by [[FPC git|staging/adding]] it as well
1801802. If you want to just get rid of the "both modified" status (= conflicted) without adding the file, use `git reset file`
181181
182182Once all files have been staged or marked as not conflicted, you can commit (only staged files will be committed).
183183
184184### add (adding new files)
185185
186186Subversion uses the *add* command to add a file to the versioning system. This is no different in git: If you want to add a file, you must add it first, like this:
187187
188188 git add newfile.pas
189189
190190You must then (just as in subversion) still commit this newly added file.
191191
192192### rm (removing files)
193193
194194Subversion uses the *rm* command to remove a file from the versioning system. This is no different in git:
195195
196196 git rm nolongerneededfile.pas
197197
198198You must then (just as in subversion) still commit this removed file.
199199
200200### mv (renaming files)
201201
202202Subversion uses the *mv* command to rename a file in the versioning system. This is no different in git:
203203
204204 git mv oldfile.pas newfile.pas
205205
206206You must then (just as in subversion) still commit this change.
207207
208208As in subversion, you can move one or more files to another directory:
209209
210210 git mv file1.pas file2.pas somesubdir
211211
212212### commit
213213
214214If you have made some changes locally and wish to commit them, this is a 2-step process:
215215
216216 git add myfile.pas
217217
218218This schedules the file to be committed (called *staging* in git, so the changes are now *staged*). You can add as many files as you want like this.
219219
220220> **Note:** An easy way to remember this is that svn requires the same for newly added files. Git extends this to all changes, because that way you not only can selectively schedule individual new files for the next commit, but also changes to existing files. The opposite of `git add` is `git reset` (**without** the `--hard` parameter!)
221221
222222> **Note:** To see the changes that have been staged/scheduled for commit, use `git diff --cached`. Plain `git diff` will show local changes that are not (yet) staged.
223223
224224When you are ready to commit what you have staged, you can commit:
225225
226226 git commit -m '* Some nice comment telling what you did'
227227
228228In fact, if you're in a hurry and know you want to commit a file, you can combine the 2 commands;
229229
230230 git commit -m '* Some nice comment telling what you did' myfile.pas
231231
232232If you are really in a hurry, you can commit all changed files in one fell swoop:
233233
234234 git commit -m '* Some nice comment telling what you did' -a
235235
236236But it is not really recommended to use this, as it will commit *all* changes in your local copy, not just the ones in the current working directory.
237237
238238At this point, your changes have been saved locally, but have not yet been sent to the remote repository. To do that, you must additionally send the changes to the remote repository. This is called pushing:
239239
240240 git push
241241
242242That will send all locally committed changes to the server. Obviously only changes that have not yet been sent previously are sent.
243243
244244### diff (show changes to working copy)
245245
246246In svn, you can see the changes that have been made but have not yet been committed with *diff*. This is also correct in git:
247247
248248 git diff
249249
250250This will show all changes in your working copy ***that are not yet staged*** (scheduled for committing).
251251
252252You can view this for a single file as well:
253253
254254 git diff myfile.pas
255255
256256This will show unstaged changes made to your working copy of **myfile.pas**.
257257
258258If you have already staged one or more files (i.e. marked for inclusion in the next commit), the above will not show them in the generated diff. If you wish to see the staged changes (and *only* the staged changed), use the *--cached* command-line option:
259259
260260 git diff --cached
261261
262262### diff (show changes performed in a commit)
263263
264264In svn, you can see the changes that a commit did through `svn diff -c <revision>`. In git, you use the *show* command instead:
265265
266266 git show -p <commit_hash_or_branch_or_tag>
267267
268268If you omit the commit hash, the last commit to the current branch will be shown instead.
269269
270270### log (show commits in a branch)
271271
272272In svn, you can see the commits in a branch with `svn log`. The same works in git:
273273
274274 git log
275275
276276This will list the commit hashes (the string that git uses to identify commits, similar to revision numbers in svn) followed by the log messages. If you also want to see which files were changed, use
277277
278278 git log --stat
279279
280280### ls (listing branches)
281281
282282To get a list of branches in Subversion, you use the 'ls' command with a server URL. By convention, all directories under '/branches' are the names of branches. Branches always exist both on the client(s) and server.
283283
284284In git, branches are formalised as part of the version control system: commands deal specifically with branches rather than with paths that are treated as branches. Additionally, git differentiates between **remote branches** (branches that exist in the repository that you cloned, i.e., in this case on the gitlab server), and **local branches** (branches that you created on your machine after cloning). The repository that you cloned is referenced using the alias "origin" by default, and the names of remote branches are prepended by this alias.
285285
286286The list of local branches can be obtained using:
287287
288288 git branch
289289
290290By default, the only local branch you will have is `main`, which corresponds to svn trunk. This local branch is automatically created when performing the initial clone operation.
291291
292292The list of remote branches can be obtained using:
293293
294294 git branch -r
295295
296296By default, the remote branches are the branches that exist in the repository on the gitlab server, whose alias is "origin". The local `main` branch automatically *tracks* (~ is linked to) the remote `origin/main` branch. Because of this tracking, executing `git pull` resp. `git push` commands while you have your local `main` branch checked out will synchronise the two from resp. to gitlab. See [[FPC git|switch]] on how to create more local branches and how to link them to remote branches.
297297
298298> **Note:** While git always downloads all branches and their commits by default when cloning or pulling and while you can use their content without a network connection, you cannot directly work on remote branches (since they're remote and not local). Instead, you have to create a local branch that "tracks" this remote branch.
299299
300300> **Note:** Do not directly checkout a remote branch. That will put you in a so-called "detached HEAD" state: your working copy will contain the contents from that branch, but you can't commit anything as you can only commit to local branches. You can get out of a "detached HEAD" state by simply checking out another branch.
301301
302302### copy (creating a branch)
303303
304304To create a branch from the current working directory situation, you can create a branch like this:
305305
306306 git branch mybugfix
307307
308308this will create a branch mybugfix from the currently checked out branch at the current commit. But it does not yet make this the active branch.
309309
310310You need to check out the newly made branch first:
311311
312312 git checkout mybugfix
313313
314314The two operations can also be combined with one command:
315315
316316 git checkout -b mybugfix
317317
318318### switch (checking out a branch)
319319
320320To switch to an existing *local* branch **mybugfix**, you can use the checkout command:
321321
322322 git checkout mybugfix
323323
324324this will check out branch mybugfix. If there are any uncommitted changes which would cause a conflict, git will refuse the checkout.
325325
326326To switch to a *remote* branch \`mybugfix2\`, which does not exist yet locally, you can also use the checkout command:
327327
328328 git checkout mybugfix2
329329
330330this will check out branch mybugfix2 and automatically set it up to track the remote branch. Here again, if there are any uncommitted changes which would cause a conflict, git will refuse the checkout.
331331
332332Note that if the branch does not exist remotely, this will simply create a new branch locally. It is better to be explicit:
333333
334334 git checkout -b mybugfix2 --track origin/mybugfix2
335335
336336If you created a branch locally which does not yet exist on the server, made some modifications, and you wish to push this branch to the server, you must tell this to git when pushing:
337337
338338 git push -u origin/mybugfix mybugfix
339339
340340the **-u origin/mybugfix** tells git all it needs to know to connect the local with the remote branch.
341341
342342### revert
343343
344344#### Revert the entire working tree
345345
346346If you have made some changes locally and wish to undo them, you can do a *hard reset* in git:
347347
348348 git reset --hard
349349
350350This will undo any changes you made in the entire checkout, including any [[FPC git|staged changes]].
351351
352352#### Revert changes to specific files/directories
353353
354354You cannot undo changes to individual files with `git reset --hard`. Instead, use
355355
356356 git checkout <pathspec>
357357
358358`pathspec` can be any combination of files and directories. Note that if the files had [[FPC git|staged changes]], this command will restore the staged version rather than the last committed version.
359359
360360> **Note:** At first sight, the git `checkout` command replaces an arbitrary collection of svn commands. The reason is that its operation is defined as "update the files in my working tree to match the specified staged/committed version of the files". So switching to a branch corresponds to getting the version of the files from that branch, while reverting corresponds to the latest version of the files from the current branch.
361361
362362### merge (merging the changes in 2 branches)
363363
364364To merge changes in 2 branches, you use the *merge* command. If we want to merge the changes in *mybugfix* to *fixes* then we do:
365365
366366 git checkout fixes
367367 git merge mybugfix
368368
369369### blame (check who made modifications)
370370
371371To see who changes what line (and in what commit) svn offers you the 'blame' command. The same command exists in git.
372372
373373 git blame yourfile.pas
374374
375375### status (check status of files)
376376
377377To see whether there are any changed files in your working repository, svn offers the 'status' command. The same command exists in git.
378378
379379 git status
380380
381381will present you with all changed, staged and new files in the repository.
382382
383383If you want only the status of files below a certain directory, you can specify the name of the directory. So to get the changes in the current working directory (or below) that would be:
384384
385385 git status .
386386
387387will present you with all changed, staged and new files in the current directory. This is the default behaviour of svn.
388388
389389### shelve (temporarily undo changes)
390390
391391Subversion has an (experimental) feature that allows to temporarily set aside changes to your working copy : shelve. This feature exists since a long time in git and is called stash:
392392
393393 git stash
394394
395395will set aside any changes to the working copy, and restore the working copy to the state it would be in if you did a 'git pull' (or svn update).
396396
397397To reapply the changes you set aside to the working copy, and to remove them from the list of stashes at the same time, you can execute the following command:
398398
399399 git stash pop
400400
401401If any conflicts occur, you can
402402
403403- resolve them, or
404404- use [[FPC git|git reset --hard]] to revert all files again
405405
406406In either case, the stash will not be touched when conflicts occurred while applying it. If you still with to remove it, you can do so with
407407
408408 git stash drop
409409
410410### info (get working dir and server info)
411411
412412In subversion, you can get information about the current working directory and remote server configuration using *svn info*. Since git is a distributed system, no direct equivalent of the info command exists: there is no single server, and the revision number as known in subversion does not exist.
413413
414414The following script attempts to display similar information as the *svn info* command:
415415
416416``` bash
417417#!/bin/bash
418418
419419# author: Duane Johnson
420420# email: duane.johnson@gmail.com
421421# date: 2008 Jun 12
422422# license: MIT
423423#
424424# Based on discussion at http://kerneltrap.org/mailarchive/git/2007/11/12/406496
425425
426426pushd . >/dev/null
427427
428428# Find base of git directory
429429while [ ! -d .git ] && [ ! `pwd` = "/" ]; do cd ..; done
430430
431431# Show various information about this git directory
432432if [ -d .git ]; then
433433 echo "== Remote URL: `git remote -v`"
434434
435435 echo "== Remote Branches: "
436436 git branch -r
437437 echo
438438
439439 echo "== Local Branches:"
440440 git branch
441441 echo
442442
443443 echo "== Configuration (.git/config)"
444444 cat .git/config
445445 echo
446446
447447 echo "== Most Recent Commit"
448448 git --no-pager log -n1
449449 echo
450450
451451 echo "Type 'git log' for more commits, or 'git show' for full commit details."
452452else
453453 echo "Not a git repository."
454454fi
455455
456456popd >/dev/null
457457```
458458
459459Note that this script will also work in the Windows environment if you have the windows git client installed, because it comes with a minimal unix environment.
460460
461461### bisect'ing
462462
463463When it is known that for example "make cycle" worked for a certain revision but it is broken with the current head of main, one can do a manual "binary search" to find the broken revision. With git, this can be done fully automatically using the git command `bisect`:
464464
465465 # change into a directory with a fpc git repository
466466 git bisect start # tell git that we start bisecting
467467 git bisect bad # mark the currently checkout commit as bad
468468 git checkout 12345678 # checkout a commit you know that it is good
469469 git bisect good # tell git that at this commit everything is good
470470
471471During this command, git checks out the commit it wants to know if it is good or bad. In case of a broken "make cycle" one can run this now and tell git by "git bisect good" or "git bisect bad" what the status of the commit is. Then git will automatically checkout the next commit to test. After several tests, git will tell which commit that one is which broke "make cycle". As this is a tedious task, the search can be also automated (Unix shell):
472472
473473 git bisect run sh -c 'cd $PWD/compiler && make cycle'
474474
475475git runs the passed command and depending on the result value, the commit will be marked as good (0) or bad (1 to 127, 255 tells git to abort search). git continues to run the command till it finds the commit which breaks things.
476476
477477### file properties (EOL handling etc.)
478478
479479Subversion allows you to set some properties on files. There are 'reserved' properties that svn itself uses, for example to handle EOL handling and file type. Because git operates on diffs and not on files, no similar concept exists.
480480
481481However, git does allow you to set global or local attributes for classes of files. These are in the *.gitattributes* file. That file should be located in the root of your repository, and can contain some attributes. For example:
482482
483483 * text=auto
484484 *.txt text
485485 *.vcproj text eol=crlf
486486 *.sh text eol=lf
487487 *.jpg -text
488488
489489This is a regular file which you can (and must) add with *git add* so it is saved for all users.
490490
491491### cherry picking
492492
493493To copy one commit from branch to another, cherry picking can be used, checkout the branch where the commit shall be added and execute:
494494
495495 git cherry-pick -x <hash of commit>
496496
497497If this operation causes a conflict, fix it and continue the operation with:
498498
499499 git cherry-pick --continue
500500
501501To track which commits are cherry picked, make sure to always use the option `-x`. This appends a small note to the commit message containing the hash of the cherry-picked commit.
502502
503503In case you want to abort the cherry picking e.g. because of too many conflicts, execute
504504
505505 git cherry-pick --abort
506506
507507### Managing the FPC fixes branch
508508
509509So far, FPC uses a developement model which is sometimes called the "ghetto development model". Patches battle out in the main branch if they are good and if they are good, they are ported to the fixes branch from which releases are created. This development model is not naturally supported by git but can be implemented based on cherry-picking. To make tracking of cherry picks easier, `git cherry-pick` must be called with `-x`. Furthermore, only one commit at once may be cherry-pick.
510510
511511Example:
512512
513513``` bash
514514# change to the top-level of a clone of the FPC Source repository
515515
516516git checkout fixes_3_2 # switch to/checkout out the fixes branches, if you did not do so before
517517git pull # ensure fixes_3_2 is up-to-date
518518git cherry-pick -x 12345678 # 12345678 is the hash (can be a short or full hash) of the commit to be cherry picked to fixes
519519git push # push the change to the remote repository
520520```
521521
522522For conflict resolution, see section about cherry picking.
523523
524524To make things a little bit more easy, to get more information in case of conflits and avoid to forget `-x`, use a script `gcp` like:
525525
526526``` bash
527527#!/usr/bin/env bash
528528git show --name-only $1
529529git cherry-pick -x $1 || exit 255
530530```
531531
532532> **Note:** Always cherry pick to fixes with -x for tracking and cherry pick only one commit at once.
533533
534534To figure out which hashes are eliglibe (i.e. not yet cherry picked) for cherry picking, use a script like <https://gitlab.com/freepascal.org/fpc/merging/-/blob/main/findeligible> This script is comparable complicated as it takes also merges from svn times into account. A regularily updated list of eliglible commits can be found at: <https://gitlab.com/freepascal.org/fpc/merging/-/blob/main/eligible.log?expanded=true&viewer=simple>
535535
536536#### Mass cherry picking
537537
538538If you have a list of commits identified by their hashes in a file, they can be cherry picked using the script `gcp` from above like:
539539
540540``` bash
541541xargs -n 1 gcp < filewithhashes
542542```
543543
544544Using the script from above is important because xargs only stops if the called program returns 255. So in case of a cherry pick conflict, the command aborts, one can fix the conflict, remove the already cherry picked commits from `filewithwith` and continue.
545545
546546A file with svn revisions can be converted easily to a list of hashes by something like:
547547
548548``` bash
549549cat filewithrevs | xargs -n 1 git log --grep='trunk@{}' --format='%H' > filewithhashes
550550```
551551
552552#### Submitting a request to merge/cherry-pick a certain commit to fixes
553553
554554Using Gitlab allows to have a defined procedure to merge or actually cherry-pick a certain commit from main(/trunk) to fixes.
555555
5565561. Login to Gitlab
5575572. Open the commit in Gitlab
5585583. Click the Options button at the upper right corner and select Cherry-pick
5595594. Choose the latest fixes branch (fixes_3_2 at the time of writing) in the "Pick into branch" field
5605605. Click Cherry-pick, if the commit cannot be cherry-picked due to textual conflicts, you get an error in this step. Possible solutions are:
561561 1. Find the commit which needs to be cherry-picked before the current one to get proper textual merging and submit this cherry-pick request first
562562 2. Cherry-pick the commit in a local clone of the respository and submit a merge request against this newly created commit.
5635636. Do no change anything on the next page, just click Create merge request
564564
565565## Submitting merge requests
566566
567567A big advantage of a distributed version control system is that you can have your own private repository. So you can fully version your work without any access to the pristine repository and when you are ready, you can submit a so-called merge request (MR) to get your work into the official repository.
568568
569569The workflow is as follows:
570570
5715711. Login to GitLab
5725722. Go to the repository of the project you want to work on, e.g. FPC Source: <https://gitlab.com/freepascal.org/fpc/source>
5735733. Click Fork at the upper right corner and choose the settings as you like in the following dialog, then click Fork at the bottom. GitLab creates now a full copy of the chosen repository.
5745744. Clone the newly create repository to your machine by getting the URL from the Clone button at the upper right corner of the respository's page on GitLab (e.g. `git clone `[`https://gitlab.com/YourUsername/fpcsource.git`](https://gitlab.com/YourUsername/fpcsource.git)).
5755755. Create a new branch for your work: `git checkout -b myfeature`
5765766. Now do your work: change, commit, change, etc.
5775777. When you are ready, push your branch with `git push origin` into your private repository on GitLab. At this point GitLab shows you already a link how to submit the changes as a merge request to the official/pristine repository. Click the link and follow the instructions.
5785788. If you want to automatically keep your fork up to date with the pristine repository, go to Settings -\> Repository -\> Mirroring repositories and fill in the required fields as described in the [GitLab docs](https://docs.gitlab.com/ee/user/project/repository/mirror/index.html).
579579
580580Of course, it is possible work with more than one remote repository in a local one. I.e. push/pull changes from and to your own private one and pull from the official repository. This would go to far for this wiki, have a look at <https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes> instead.
581581
582582---
583583*From the Free Pascal wiki, page "FPC git", as it stood on 2022-03-06 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
584584Category: Version Control

Back to history