{"id":115,"date":"2019-06-25T14:32:38","date_gmt":"2019-06-25T10:32:38","guid":{"rendered":"https:\/\/andre.hwt.ru\/?p=115"},"modified":"2019-06-25T20:12:23","modified_gmt":"2019-06-25T16:12:23","slug":"%d0%b7%d0%b0%d0%bc%d0%b5%d1%82%d0%ba%d0%b8-%d0%bf%d0%be-%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b5-%d1%81-git","status":"publish","type":"post","link":"https:\/\/andre.hwt.ru\/?p=115","title":{"rendered":"\u0417\u0430\u043c\u0435\u0442\u043a\u0438 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 Git"},"content":{"rendered":"<h3>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u0430\u0448\u0435 \u0438\u043c\u044f, \u0430\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440.<br \/>\n\u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/p>\n<p><!--more--><\/p>\n<pre><code>git config --global user.name &quot;Imya Familiya&quot;\ngit config --global user.email as@as.ru\ngit config --global core.editor vi\ngit config --list<\/code><\/pre>\n<h3>\u041f\u043e\u043c\u043e\u0449\u044c \u043f\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c<\/h3>\n<pre><code>git help &lt;\u043a\u043e\u043c\u0430\u043d\u0434\u0430&gt;\ngit &lt;\u043a\u043e\u043c\u0430\u043d\u0434\u0430&gt; --help\nman git-&lt;\u043a\u043e\u043c\u0430\u043d\u0434\u0430&gt;<\/code><\/pre>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0444\u0430\u0439\u043b\u043e\u0432<\/h3>\n<pre><code>mkdir repo-name\ngit init\ngit status<\/code><\/pre>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430<\/h3>\n<pre><code>vi README.md\ngit add README.md<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/h3>\n<pre><code>git diff\ngit diff --staged<\/code><\/pre>\n<h3>\u0424\u0438\u043a\u0441\u0430\u0446\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439<\/h3>\n<pre><code>git commit README.md<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432<\/h3>\n<pre><code>git log<\/code><\/pre>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043c\u0435\u0442\u043a\u0430\u043c\u0438<\/h3>\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043c\u0435\u0442\u043e\u043a<\/p>\n<pre><code>git tag<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043e\u0442\u043c\u0435\u0442\u043a\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443<\/p>\n<pre><code>git tag  v0.1 a118807049c3bbe01113f8dd81afa1872253c256<\/code><\/pre>\n<p><a href=\"https:\/\/git-scm.com\/book\/ru\/v2\/%D0%9E%D1%81%D0%BD%D0%BE%D0%B2%D1%8B-Git-%D0%A0%D0%B0%D0%B1%D0%BE%D1%82%D0%B0-%D1%81-%D0%BC%D0%B5%D1%82%D0%BA%D0%B0%D0%BC%D0%B8\">\u041c\u0435\u0442\u043a\u0438 \u0431\u044b\u0432\u0430\u044e\u0442 \u0434\u0432\u0443\u0445 \u0432\u0438\u0434\u043e\u0432<\/a><\/p>\n<h3>\u0412\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0435\u0442\u043a\u0438 New1<\/strong><\/p>\n<pre><code>git branch New1<\/code><\/pre>\n<p><strong>\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0435\u0442\u043a\u0443 New1<\/strong><\/p>\n<pre><code>git checkout New1<\/code><\/pre>\n<h3>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0442\u043a\u0430\u043c\u0438<\/h3>\n<p><strong>\u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0443 \u0432\u0430\u0441 \u0432\u0435\u0442\u043e\u043a<\/strong><\/p>\n<pre><code>git branch<\/code><\/pre>\n<p><strong>\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043a\u043e\u043c\u043c\u0438\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0432\u0435\u0442\u043e\u043a<\/strong><\/p>\n<pre><code>git branch -v<\/code><\/pre>\n<h3>\u0421\u043b\u0438\u044f\u043d\u0438\u0435 (merge)<\/h3>\n<p><strong>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043c\u0430\u0441\u0442\u0435\u0440 \u0438 \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043b\u0438\u044f\u043d\u0438\u0435 \u0432\u0435\u0442\u043a\u0438 hotfix<\/strong><\/p>\n<pre><code>git checkout master\ngit merge hotfix<\/code><\/pre>\n<p><strong>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0435\u0442\u043a\u0443 hotfix<\/strong><\/p>\n<pre><code>git branch -d hotfix<\/code><\/pre>\n<h3>\u041a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/h3>\n<pre><code>git clone [url]\ngit clone git:\/\/github.com\/schacon\/grit.git<\/code><\/pre>\n<p><strong>\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 321<\/strong><\/p>\n<pre><code>git clone git:\/\/github.com\/schacon\/grit.git 321<\/code><\/pre>\n<h1>\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/h1>\n<h3>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432<\/h3>\n<pre><code>git remote\ngit remote -v<\/code><\/pre>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432<\/h3>\n<p>pb - \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u043d\u0430\u043c \u0438\u043c\u044f<\/p>\n<pre><code>git remote add [\u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435] [url]\ngit remote add pb git:\/\/github.com\/paulboone\/ticgit.git<\/code><\/pre>\n<h3>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/h3>\n<p>\u0441 \u0438\u043c\u0435\u043d\u0435\u043c pb<\/p>\n<pre><code>git fetch pb<\/code><\/pre>\n<h3>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (push)<\/h3>\n<pre><code>git push [\u0443\u0434\u0430\u043b. \u0441\u0435\u0440\u0432\u0435\u0440] [\u0432\u0435\u0442\u043a\u0430]\ngit push pb master<\/code><\/pre>\n<p>\u0441 \u043c\u0435\u0442\u043a\u0430\u043c\u0438<\/p>\n<pre><code>git push pb master --tags<\/code><\/pre>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p><a href=\"https:\/\/git-scm.com\/book\/ru\/v1\/%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5-%D0%9E-%D0%BA%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D0%B5-%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D0%B9\">\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430 \u043f\u043e Git<\/a><br \/>\n<a href=\"https:\/\/habr.com\/ru\/post\/416887\/\">\u041a\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c commit'\u044b<\/a><br \/>\n<a href=\"https:\/\/guides.github.com\/features\/mastering-markdown\/\">\u0413\u0430\u0439\u0434 \u043f\u043e markdown<\/a><br \/>\n<a href=\"https:\/\/gist.github.com\/PurpleBooth\/109311bb0361f32d87a2\">\u0428\u0430\u0431\u043b\u043e\u043d \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e Readme<\/a><br \/>\n<a href=\"https:\/\/habr.com\/ru\/post\/323234\/\">\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0448\u0430\u0442\u044c merge \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u0430\u0448\u0435 \u0438\u043c\u044f, \u0430\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440. \u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[47],"tags":[45,46],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts\/115"}],"collection":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=115"}],"version-history":[{"count":8,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts\/115\/revisions"}],"predecessor-version":[{"id":124,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=\/wp\/v2\/posts\/115\/revisions\/124"}],"wp:attachment":[{"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andre.hwt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}