AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Sonstige Werkzeuge [GIT] Organisation von Library-Varianten, Best practices
Thema durchsuchen
Ansicht
Themen-Optionen

[GIT] Organisation von Library-Varianten, Best practices

Ein Thema von Rollo62 · begonnen am 11. Mai 2018 · letzter Beitrag vom 14. Mai 2018
 
Rollo62

Registriert seit: 15. Mär 2007
4.168 Beiträge
 
Delphi 12 Athens
 
#5

AW: [GIT] Organisation von Library-Varianten, Best practices

  Alt 11. Mai 2018, 14:53
Zitat:
By remembering this core concept and reflecting on it, you can understand that submodule support some workflows well and less optimally others. There are at least three scenarios where submodules are a fair choice:
  • A. When a component or subproject is changing too fast or upcoming changes will break the API, you can lock the code to a specific commit for your own safety.
  • B When you have a component that isn’t updated very often and you want to track it as a vendor dependency. I do this for my vim plugins for example.
  • C. When you are delegating a piece of the project to a third party and you want to integrate their work at a specific time or release. Again this works when updates are not too frequent.
Die Rede ist hier von submodules in einem main-modul (Projekt).
Wenn ich aber mehrere Branches in den submodules habe, wird dann die ganze Verwaltung nicht schnell zu undurchsichtig ?

Man könnte z.B. vielleicht auch eine Schicht dazwischenschalten, also
Delphi-Quellcode:
Projekt1 - submodule1 - branch feature1 -
                                          \
Projekt2 - submodule2 - branch feature2 -- submodule comon base
                                          /
Projekt3 - submodule3 - branch feature3 -
Wenn die submodules 1-3 quasi den master branch für das jeweilige Projekt darstellen.
Dann wären zumindest Projekte und Library sauberer getrennt, und Änderungen in submodule1 könnten (womöglich) leichter gewartet werden.

Update:
Ginge das nicht in die Richtung fork mit pull request ?
Würde sich das für ein internes GIT lohnen, oder ist der Aufwand zu hoch ?

Zitat:
This is a very common workflow: you start using someone else’s project as submodule but then after a while you find the need to customize it and tweak it yourself, so you want to fork the project and replace the submodule with your own fork. How is that done?

The submodules are stored in .gitmodules:

$ cat .gitmodules
[submodule "ext/google-maps"]
path = ext/google-maps
url = git://git.naquadah.org/google-maps.git

You can just edit the url with a text editor and then run the following:

$ git submodule sync

This updates .git/config which contains a copy of this submodule list (you could also just edit the relevant [submodule] section of .git/config manually).

Rollo

Geändert von Rollo62 (11. Mai 2018 um 15:02 Uhr)
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:39 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz