mirror of
https://github.com/danielkummer/git-flow-cheatsheet.git
synced 2024-11-21 23:43:21 +01:00
410 lines
14 KiB
HTML
410 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="pl" xmlns="http://www.w3.org/1999/html">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<title>ściągawka do git-flow</title>
|
|
<link href='http://fonts.googleapis.com/css?family=Sansita+One' rel='stylesheet' type='text/css'>
|
|
<link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen,print">
|
|
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen,print">
|
|
|
|
<script src="js/jquery-1.7.2.min.js"></script>
|
|
|
|
|
|
<script type="text/javascript">
|
|
var _gaq = _gaq || [];
|
|
_gaq.push(['_setAccount', 'UA-33766650-1']);
|
|
_gaq.push(['_trackPageview']);
|
|
|
|
(function () {
|
|
var ga = document.createElement('script');
|
|
ga.type = 'text/javascript';
|
|
ga.async = true;
|
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
var s = document.getElementsByTagName('script')[0];
|
|
s.parentNode.insertBefore(ga, s);
|
|
})();
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="banner"><a href="https://github.com/danielkummer/git-flow-cheatsheet">Fork me on GitHub</a></div>
|
|
<header>
|
|
|
|
<h1 id="title">ściągawka do git-flow</h1>
|
|
|
|
<p id="author">
|
|
Autor: <a href="http://twitter.com/0r1g4m14dd1c7">Daniel Kummer</a>
|
|
<a href="https://twitter.com/share" class="twitter-share-button" data-via="0r1g4m14dd1c7" data-size="large">Tweet</a>
|
|
<script>!function (d, s, id) {
|
|
var js, fjs = d.getElementsByTagName(s)[0];
|
|
if (!d.getElementById(id)) {
|
|
js = d.createElement(s);
|
|
js.id = id;
|
|
js.src = "//platform.twitter.com/widgets.js";
|
|
fjs.parentNode.insertBefore(js, fjs);
|
|
}
|
|
}(document, "script", "twitter-wjs");</script>
|
|
</p>
|
|
<p id="desc">sprawne rozgałęzianie z git-flow od <a href="http://nvie.com/">Vincenta Driessen'a</a></p>
|
|
<p id="translations">tłumaczenia:
|
|
<a href="index.html" title="english">English</a> -
|
|
<a href="index.es_ES.html" title="spanish">Castellano</a> -
|
|
<a href="index.pt_BR.html" title="Brazilian Portugues">Brazilian Portugues</a> -
|
|
<a href="index.zh_TW.html" title="Traditional Chinese">繁體中文(Traditional Chinese)</a> -
|
|
<a href="index.zh_CN.html" title="Simplified Chinese">简体中文(Simplified Chinese)</a> -
|
|
<a href="index.ja_JP.html" title="日本語">日本語</a> -
|
|
<a href="index.tr_TR.html" title="Turkce">Türkçe</a> -
|
|
<a href="index.ko_KR.html" title="한국어">한국어(Korean)</a> -
|
|
<a href="index.fr_FR.html" title="Français">Français</a> -
|
|
<a href="index.it_IT.html" title="Italiano">Italiano</a> -
|
|
<a href="index.nl_NL.html" title="Nederlands">Nederlands</a> -
|
|
<a href="index.ru_RU.html" title="Russian">Русский (Russian)</a> -
|
|
<a href="index.de_DE.html" title="German">Deutsch (German)</a> -
|
|
<a href="index.ca_CA.html" title="Català">Català (Catalan)</a> -
|
|
<a href="index.ro_RO.html" title="Romanian">Română (Romanian)</a> -
|
|
<a href="index.el_GR.html" title="Ελληνικά (Greek)">Ελληνικά (Greek)</a> -
|
|
<a href="index.uk_UK.html" title="Ukrainian">Українська (Ukrainian)</a> -
|
|
<a href="index.vi_VN.html" title="Tiếng Việt">Tiếng Việt (Vietnamese)</a> -
|
|
<a href="#" class="active" title="Polish">Polski</a>
|
|
</p>
|
|
</header>
|
|
|
|
<div id="main">
|
|
|
|
|
|
<div class="scrollblock">
|
|
<h2>Wprowadzenie</h2>
|
|
|
|
<p>
|
|
git-flow jest zbiorem rozszerzeń git dostarczającym wysokopoziomowe operacje na repozytorium, wspierającym strategię
|
|
rozkałęziania opracowaną przez Vincenta Driessen'a.
|
|
<small><a href="http://nvie.com/posts/a-successful-git-branching-model/">Czytaj więcej</a></small>
|
|
</p>
|
|
<p class="divider">★ ★ ★</p>
|
|
|
|
<p>Ta ściągawka prezentuje podstawy użycia operacji git-flow.</p>
|
|
|
|
<p class="divider">★ ★ ★</p>
|
|
</div>
|
|
|
|
<div class="scrollblock">
|
|
<h2>Podstawowe wskazówki</h2>
|
|
<ul>
|
|
<li>Git flow dostarcza świetną pomoc z poziomu wiersza poleceń. Przeczytaj uważne, aby dostrzec co się wydarzy...</li>
|
|
<li><a href="http://www.sourcetreeapp.com/">Sourcetree</a> - klient dla OSX/Windows jest wyśmienitą nakładką graficzną dla git
|
|
wspierającą również git-flow.
|
|
</li>
|
|
<li>Git-flow bazuje na scalaniu. Nie używa zmiany bazy do integorwania zmian.</li>
|
|
</ul>
|
|
<p class="divider">★ ★ ★</p>
|
|
</div>
|
|
|
|
|
|
<div class="scrollblock">
|
|
<h2><a name="setup" href="#setup">Konfiguracja</a></h2>
|
|
<ul>
|
|
<li>Zanim zaczniesz potrzebujesz działającej instalacji git.</li>
|
|
<li>Git flow działa na systemach OSX, Linux oraz Windows</li>
|
|
</ul>
|
|
<p class="divider">★ ★ ★</p>
|
|
<div class="col-1">
|
|
<h3>OSX</h3>
|
|
<span>Homebrew</span>
|
|
<blockquote>
|
|
$ brew install git-flow
|
|
</blockquote>
|
|
<span>Macports</span>
|
|
<blockquote>
|
|
$ port install git-flow
|
|
</blockquote>
|
|
<h3>Linux</h3>
|
|
<blockquote>
|
|
$ apt-get install git-flow
|
|
</blockquote>
|
|
<h3>Windows (Cygwin)</h3>
|
|
<blockquote>
|
|
$ wget -q -O - --no-check-certificate
|
|
https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash
|
|
</blockquote>
|
|
<p>Potrzebujesz wget oraz util-linux żeby zainstalować git-flow.</p>
|
|
</div>
|
|
<div class="col-2">
|
|
<p>
|
|
Szczegółową instrukcję instalacji git możesz znaleźć na <a href="https://github.com/nvie/gitflow/wiki/Windows">git flow
|
|
wiki</a>.
|
|
</p>
|
|
<img src="img/download.png" alt="install git-flow"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="scrollblock">
|
|
<h2><a name="getting_started" href="#getting_started">Pierwsze kroki</a></h2>
|
|
<p>Żeby dostować ustawienia Twojego projektu Git flow musi zostać zainicjalizowany.</p>
|
|
<p class="divider">★ ★ ★</p>
|
|
<div class="col-1">
|
|
<h3>Inicjalizacja</h3>
|
|
|
|
<p>Rozpocznij używanie git-flow inicjalizując go w istniejącym repozytorium git:</p>
|
|
<blockquote>
|
|
git flow init
|
|
</blockquote>
|
|
<p>
|
|
Będziesz musiał odpowiedzieć na kilka pytań dotyczących nazewnictwa gałęzi.<br/>
|
|
Zaleca się stosowanie wartości domyślnych.
|
|
</p>
|
|
|
|
</div>
|
|
<div class="col-2">
|
|
<div class="initialize"></div>
|
|
<div class="lines-small"></div>
|
|
<div class="lines-open"></div>
|
|
<div class="lines-big"></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="scrollblock">
|
|
<h2><a name="features" href="#features">Funkcjonalności</a></h2>
|
|
|
|
<ul class="narrow">
|
|
<li>Rozwój nowych funkcjonalności przyszłych wydań.</li>
|
|
<li>Zazwyczaj istnieją tylko w repozytoriach deweloperów.</li>
|
|
</ul>
|
|
<p class="divider">★ ★ ★</p>
|
|
|
|
<div class="col-1">
|
|
<h3>Rozpocznij nową funkcjonalność </h3>
|
|
<p>Rozwój nowej funkcjonalności rozpoczyna się od gałęzi 'develop'.</p>
|
|
<p>Rozpocznij rozwój nowej funkcjonalności używając:</p>
|
|
<blockquote>
|
|
git flow feature start MYFEATURE
|
|
</blockquote>
|
|
<p>W ten sposób tworzysz gałąź dla nowej funkcjonalności bazując na gałęzi 'develop' jednocześnie się na nią przełączając.</p>
|
|
|
|
<!--
|
|
- Bump the version number now!
|
|
- Start committing last-minute fixes in preparing your release
|
|
- When done, run:
|
|
|
|
git flow release finish 'testrelease'
|
|
|
|
|
|
|
|
-->
|
|
</div>
|
|
<div class="col-2">
|
|
<div class="feature-start"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="scrollblock">
|
|
<div class="col-1">
|
|
<h3>Zakończ funkcjonalność</h3>
|
|
|
|
<p>
|
|
Zakończ rozwój funkcjonalnośc.
|
|
Ta czynność spowoduje:
|
|
</p>
|
|
<ul>
|
|
<li>Scali gałąź MYFEATURE do 'develop'</li>
|
|
<li>Usunie gałąź funkcjonalności</li>
|
|
<li>Przełączy spowrotem do gałęzi 'develop'</li>
|
|
</ul>
|
|
|
|
<blockquote>
|
|
git flow feature finish MYFEATURE
|
|
</blockquote>
|
|
</div>
|
|
<div class="col-2">
|
|
<div class="feature-end"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="scrollblock">
|
|
<div class="col-1">
|
|
<h3>Opublikowanie funkcjonalności</h3>
|
|
|
|
<p>
|
|
Rozwijasz funkcjonalność w grupie? <br/>
|
|
Opublikuj funkcjonalność na serwerze zdalnym, dzięki czemu będą jej mogli używać inni użytkownicy.
|
|
</p>
|
|
|
|
<blockquote>
|
|
git flow feature publish MYFEATURE
|
|
</blockquote>
|
|
</div>
|
|
<div class="col-2">
|
|
<div class="feature-publish"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="scrollblock">
|
|
<div class="col-1">
|
|
<h3>Pobieranie opublikowanej zmiany</h3>
|
|
|
|
<p>
|
|
Pobierz zmianę opublikowaną przez innego użytkownika.
|
|
</p>
|
|
|
|
<blockquote>
|
|
git flow feature pull origin MYFEATURE
|
|
</blockquote>
|
|
|
|
<p>Możesz śledzić zmianę na serwerze źródłowym używając <code> git flow feature track MYFEATURE</code> </p>
|
|
</div>
|
|
<div class="col-2">
|
|
<div class="feature-pull"></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="scrollblock">
|
|
<h2><a name="release" href="#release">Utwórz wydanie</a></h2>
|
|
|
|
<ul>
|
|
<li>Support preparation of a new production release</li>
|
|
<li>Allow for minor bug fixes and preparing meta-data for a release</li>
|
|
</ul>
|
|
<p class="divider">★ ★ ★</p>
|
|
<div class="col-1">
|
|
<h3>Start a release</h3>
|
|
|
|
<p>To start a release, use the git flow release command. It creates a release branch created from the 'develop' branch.</p>
|
|
<blockquote>
|
|
git flow release start RELEASE [BASE]
|
|
</blockquote>
|
|
<p>You can optionally supply a <code>[BASE]</code> commit sha-1 hash to start the release from. The commit must
|
|
be on the
|
|
'develop' branch.</p>
|
|
<p class="divider">★ ★ ★</p>
|
|
<p>It's wise to publish the release branch after creating it to allow release commits by other developers. Do it similar to feature publishing with the command:</p>
|
|
<blockquote>
|
|
git flow release publish RELEASE
|
|
</blockquote>
|
|
<p>(You can track a remote release with the <br/><code>git flow release track RELEASE</code> command)</p>
|
|
</div>
|
|
<div class="col-2">
|
|
<div class="release-start"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="scrollblock">
|
|
<div class="col-1">
|
|
<h3>Finish up a release</h3>
|
|
|
|
<p>Finishing a release is one of the big steps in git branching. It performs several actions:</p>
|
|
<ul>
|
|
<li>Merges the release branch back into 'master'</li>
|
|
<li>Tags the release with its name</li>
|
|
<li>Back-merges the release into 'develop'</li>
|
|
<li>Removes the release branch</li>
|
|
</ul>
|
|
<blockquote>
|
|
git flow release finish RELEASE
|
|
</blockquote>
|
|
<p>Don't forget to push your tags with<code>git push --tags</code></p>
|
|
|
|
</div>
|
|
<div class="col-2">
|
|
<div class="release-end"></div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="scrollblock">
|
|
<h2><a name="hotfixes" href="#hotfixes">Hotfixes</a></h2>
|
|
|
|
<ul>
|
|
<li>Hotfixes arise from the necessity to act immediately upon an undesired state of a live production version
|
|
</li>
|
|
<li>May be branched off from the corresponding tag on the master branch that marks the production version.</li>
|
|
</ul>
|
|
<p class="divider">★ ★ ★</p>
|
|
<div class="col-1">
|
|
<h3>git flow hotfix start</h3>
|
|
|
|
<p>Like the other git flow commands, a hotfix is started with</p>
|
|
<blockquote>
|
|
git flow hotfix start VERSION [BASENAME]
|
|
</blockquote>
|
|
<p>The version argument hereby marks the new hotfix release name. Optionally you can specify a basename to start from.</p>
|
|
</div>
|
|
<div class="col-2">
|
|
<div class="hotfix-start"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="scrollblock">
|
|
<div class="col-1">
|
|
<h3>Finish a hotfix</h3>
|
|
|
|
<p>By finishing a hotfix it gets merged back into develop and master. Additionally the master merge is tagged with the hotfix version.</p>
|
|
<blockquote>
|
|
git flow hotfix finish VERSION
|
|
</blockquote>
|
|
</div>
|
|
<div class="col-2">
|
|
<div class="hotfix-end"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="col-1"></div>
|
|
<div class="col-2">
|
|
<div class="lines-close"></div>
|
|
<div class="lines-small-end"></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="scrollblock">
|
|
<h2><a name="commands" href="#commands">Commands</a></h2>
|
|
<img src="img/git-flow-commands.png" alt="git-flow commands"/>
|
|
</div>
|
|
|
|
<div class="scrollblock">
|
|
<h2>Backlog</h2>
|
|
<p class="divider">★ ★ ★</p>
|
|
<ul>
|
|
<li>Not all available commands are covered here, only the most important ones</li>
|
|
<li>You can still use git and all its commands normally as you know them, git flow is only a tooling
|
|
collection
|
|
</li>
|
|
<li>The 'support' feature is still beta, using it is not advised</li>
|
|
<li>If you'd like to supply translations I'd be happy to integrate them</li>
|
|
</ul>
|
|
<p class="divider">★ ★ ★</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<footer>
|
|
<div class="scrollblock">
|
|
<h2><a name="comments" href="#comments">Comments</a></h2>
|
|
|
|
<div id="disqus_thread"></div>
|
|
</div>
|
|
</footer>
|
|
|
|
<script type="text/javascript">
|
|
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
|
var disqus_shortname = 'gitflowcheatsheet'; // required: replace example with your forum shortname
|
|
|
|
/* * * DON'T EDIT BELOW THIS LINE * * */
|
|
(function () {
|
|
var dsq = document.createElement('script');
|
|
dsq.type = 'text/javascript';
|
|
dsq.async = true;
|
|
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
|
})();
|
|
</script>
|
|
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
|
|
</noscript>
|
|
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
|
|
|
|
|
</body>
|
|
</html>
|