Pl/FGAddon: Difference between revisions

Jump to navigation Jump to search
Line 222: Line 222:
=== Git-svn ===
=== Git-svn ===


The git-svn tool is useful for those who are already familiar with using git repositories, or those who wish to have their own private aircraft development playground. Git-svn provides a bridge between the remote FGAddon Subversion repository and a local git repository. For those unfamiliar with git, the git-svn bridge together with the git repository is far more complicated to use than the native [[#Subversion|Subversion tools]]. For more information on using git, see [[Howto:Start using git]]. The following will assume that only a single aircraft will be stored in the local git repository.
Narzędzie git-svn jest przydatne dla tych, którzy są już zaznajomieni z korzystaniem z repozytoriów git, lub tych, którzy chcą mieć swój prywatny plac zabaw dla rozwoju statków powietrznych. Git-svn zapewnia pomost między zdalnym repozytorium FGAddon Subversion a lokalnym repozytorium git. Dla osób niezaznajomionych z git, most git-svn wraz z repozytorium git jest znacznie bardziej skomplikowany w użyciu niż natywne narzędzia [[#Subversion|Subversion]]. Aby uzyskać więcej informacji na temat korzystania z git, zobacz [[Howto:Start using git|Jak używać gita]]. Poniżej założymy, że tylko jeden statek powietrzny będzie przechowywany w lokalnym repozytorium git.


==== Set up ====
==== Konfiguracja ====
The git distributed version control system needs to first be [https://git-scm.com/downloads installed].
Rozproszony system kontroli wersji git musi być najpierw [https://git-scm.com/downloads zainstalowany].


==== Cloning a single aircraft ====
==== Klonowanie pojedynczego statku powietrznego ====
The first step is to 'clone' a copy of one of the aircraft in the remote Subversion trunk:
Pierwszym krokiem jest "sklonowanie" kopii jednego ze statków powietrznych z głównego katalogu Subversion:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git svn clone <aircraft_url>
git svn clone <aircraft_url>
</syntaxhighlight>
</syntaxhighlight>


For the relevant aircraft URL to use, you must chose one of the [[#Development_scenarios|development scenarios]] and find the URL in that section. The URL depends on your [[#Commit access|FGAddon commit access status]]. The clone command will create a local git repository containing solely the aircraft of interest, and initialise the git-svn bridge.
Aby użyć odpowiedniego adresu URL statku powietrznego, należy wybrać jeden ze [[#Scenariusze_dewelopmentu|scenariuszy dewelopmentu]] i znaleźć adres URL w tej sekcji. Adres URL zależy od [[#Dostęp_do_zatwierdzania_zmian|statusu dostępu do zatwierdzenia FGAddon]]. Polecenie <code>clone</code> utworzy lokalne repozytorium git zawierające wyłącznie interesujący nas statek powietrzny i zainicjuje most git-svn.


==== Information and history ====
==== Informacje i historia ====
At any point to see information about the local repository, type:
W dowolnym momencie, aby wyświetlić informacje o lokalnym repozytorium, wpisz:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git svn info
git svn info
Line 243: Line 243:
</syntaxhighlight>
</syntaxhighlight>


To see the history of the checked out copy of the repository, type:
Aby zobaczyć historię pobranej kopii repozytorium, wpisz:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git log
git log
</syntaxhighlight>
</syntaxhighlight>


==== Daily usage ====
==== Codzienne użytkowanie ====
The main git command you will be using is:
Główne polecenie git, które będzie używane to:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git add <path>
git add <path>
</syntaxhighlight>
</syntaxhighlight>


This will register the file or directory <code><path></code> within the local repository to allow it to later be 'committed' to the local git repository. To move or rename a file or directory, use:
Spowoduje to zarejestrowanie pliku lub katalogu <code><path></code> w lokalnym repozytorium, aby umożliwić jego późniejsze zatwierdzenie w lokalnym repozytorium git.  
 
Aby przenieść lub zmienić nazwę pliku lub katalogu, użyj:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git mv <path1> <path2>
git mv <path1> <path2>
</syntaxhighlight>
</syntaxhighlight>


However note that git history is not as robust as svn history. See the [[#Moving_or_renaming_files|git-svn file moving/renaming deficiency section]] for how to better perform this operation. To remove a file from the local repository, type:
Należy jednak pamiętać, że historia git nie jest tak solidna jak historia svn. Zobacz sekcję [[#Przenoszenie_lub_zmiana_nazwy_plików|przenoszenie plików/zmiana nazw w git-svn]] by dowiedzieć się jak lepiej wykonać tę operację. Aby usunąć plik z lokalnego repozytorium, wpisz:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git rm <path>
git rm <path>
1,361

edits

Navigation menu