{"id":412231,"date":"2024-06-29T22:25:03","date_gmt":"2024-06-29T22:25:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=412231"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=412231","title":{"rendered":"<span>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 Git: \u0442\u0440\u0443\u0434\u043e\u0432\u044b\u0435 \u0431\u0443\u0434\u043d\u0438<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ede\/060\/5dc\/ede0605dc0a35824e65fcce01d5a922e.png\" width=\"2880\" height=\"1406\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ede\/060\/5dc\/ede0605dc0a35824e65fcce01d5a922e.png\"\/><\/figure>\n<div class=\"persona\" persona=\"true\"><img decoding=\"async\" persona=\"true\" class=\"image persona__image\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/a95\/9ea\/faa\/a959eafaae4e7a3037072481e73fb89b.jpg\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a95\/9ea\/faa\/a959eafaae4e7a3037072481e73fb89b.jpg\" data-blurred=\"true\"\/><\/p>\n<h5 class=\"persona__heading\" persona=\"true\">\u0414\u0430\u0440\u044c\u044f \u041c\u0435\u043b\u0435\u043d\u0446\u043e\u0432\u0430<\/h5>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u0446\u0430 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u042f\u043d\u0434\u0435\u043a\u0441\u0430, \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0430\u0432\u0442\u043e\u0440 \u043a\u0443\u0440\u0441\u0430 \u00ab<a href=\"https:\/\/practicum.yandex.ru\/promo\/devops-course\/?utm_source=pr&amp;utm_medium=content&amp;utm_campaign=pr_content_devops-course_habr&amp;utm_content=14_04_23\"><u>DevOps \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/u><\/a>\u00bb.<\/p>\n<\/div>\n<p>\u041f\u0440\u043e\u0448\u043b\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/habr.com\/ru\/company\/yandex_praktikum\/blog\/700708\/\"><u>\u00ab\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 Git: \u043f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438 \u0432 GitHub\u00bb<\/u><\/a> \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Git \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c \u0438\u0437 \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 GitHub. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u00ab\u0433\u043e\u0440\u044f\u0447\u0438\u0435\u00bb \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0442\u0440\u0443\u0434\u043e\u0432\u044b\u0435 \u0431\u0443\u0434\u043d\u0438 \u043a\u0443\u0434\u0430 \u0432\u0435\u0441\u0435\u043b\u0435\u0435. \u0418\u043b\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c.  <\/p>\n<h3>\u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/h3>\n<ul>\n<li>\n<p>\u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f, \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u0445 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0432\u0435\u0442\u043e\u043a \u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043d\u0438\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043c\u0451\u0440\u0436\u0438\u043c \u0434\u0432\u0435 \u0432\u0435\u0442\u043a\u0438 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 (<code>rebase<\/code> \u0438 <code>merge);<\/code><\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u043e\u043b\u043a\u043d\u0451\u043c\u0441\u044f \u0441 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430\u043c\u0438 \u043f\u0440\u0438 \u043c\u0451\u0440\u0436\u0435 \u0438 \u0440\u0435\u0448\u0438\u043c \u0438\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 (<code>cherry-pick<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c, \u043a\u0430\u043a \u0441\u0445\u043b\u043e\u043f\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e (<code>squash<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 (<code>reset<\/code>, <code>revert<\/code>).<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0440\u0430\u0437\u043c\u0438\u043d\u043a\u0443 \u0441 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u2014 \u0447\u0451\u0442\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041a\u0430\u043a \u0438 \u0442\u0435\u0445\u043d\u0438\u043a\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043e\u043d\u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0431\u043e\u043b\u044c\u044e IT-\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441.<\/p>\n<h3>\u041c\u043e\u0434\u0435\u043b\u0438 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 Git \u0434\u043e\u043b\u0436\u0435\u043d \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u0441 \u0438\u0441\u0442\u043e\u0440\u0438\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442\u044c \u043b\u044e\u0431\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u043a\u043e\u0434\u043e\u043c: \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c, \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u0435\u043f\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0438 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043b\u043e\u043c\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u0432 \u043a\u043e\u0434\u0435, \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 Git: \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0442\u043a\u0438, \u043a\u0430\u043a \u0438\u0445 \u0432\u043b\u0438\u0432\u0430\u0442\u044c, \u0432 \u043a\u0430\u043a\u043e\u0439 \u043e\u0447\u0435\u0440\u0451\u0434\u043d\u043e\u0441\u0442\u0438 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u042d\u0442\u0438 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00ab\u041c\u043e\u0434\u0435\u043b\u0438 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f\u00bb. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0440\u043e\u0439\u043a\u0443 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445: <strong>Trunk-Based Development<\/strong>, <strong>Feature\/Issue Branch Workflow<\/strong> \u0438 <strong>Gitflow<\/strong>.<\/p>\n<blockquote>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Git \u043f\u043e\u0434 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<\/blockquote>\n<h3>Trunk-Based Development<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c22\/b8e\/b56\/c22b8eb5654f9d13ae02e7c6710405f7.png\" alt=\"Trunk-Based Development\" title=\"Trunk-Based Development\" width=\"2800\" height=\"1682\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c22\/b8e\/b56\/c22b8eb5654f9d13ae02e7c6710405f7.png\"\/><\/p>\n<div><figcaption>Trunk-Based Development<\/figcaption><\/div>\n<\/figure>\n<p><strong>Trunk-Based Development<\/strong> \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c: \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0442\u0440\u0443\u0434\u044f\u0442\u0441\u044f \u043d\u0430\u0434 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u043e\u0439 (<code>trunk<\/code>, <code>main<\/code> \u0438\u043b\u0438 <code>master<\/code>) \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435, \u0430 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u044e\u0442 \u043c\u0430\u0441\u0442\u0435\u0440-\u0432\u0435\u0442\u043a\u0443 \u043a \u0441\u0435\u0431\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u0432\u043d\u043e\u0441\u044f\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0442\u043e\u043c \u0432\u043b\u0438\u0432\u0430\u044e\u0442 (\u00ab\u043c\u0451\u0440\u0436\u0430\u0442\u00bb) \u0438\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 <code>master<\/code>.<\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0434\u043d\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0451\u0440\u0436\u0435\u0439 \u0432 <code>master<\/code> \u2014 \u044d\u0442\u043e \u0438 \u043f\u043b\u044e\u0441, \u0438 \u043c\u0438\u043d\u0443\u0441 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u041a\u0441\u0442\u0430\u0442\u0438, \u043e \u043f\u043b\u044e\u0441\u0430\u0445 \u0438 \u043c\u0438\u043d\u0443\u0441\u0430\u0445.<\/p>\n<p>\u0417\u0430 \u0447\u0442\u043e \u043b\u044e\u0431\u044f\u0442 <strong>Trunk-Based Development<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u0411\u044b\u0441\u0442\u0440\u0430\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u043e\u0442 \u043a\u043e\u043b\u043b\u0435\u0433.<\/strong> \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u0437\u0430\u043f\u0443\u0448\u0438\u043b\u0438 \u0432 <code>master<\/code>, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u0448\u0451\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0438 \u0441\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0432\u0441\u0451 \u0441\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u043d\u0435\u0434\u0430\u0432\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u00ab\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u00bb <code>master<\/code> \u0438 \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u00ab\u0421\u0432\u043e\u044f \u0432\u0435\u0442\u043a\u0430\u00bb.<\/strong> \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430\u0434 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u043e\u0439, \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u043e\u043d\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043d\u0435\u0439 \u043a\u0430\u043a \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u043e\u0431\u0449\u0435\u043c\u0443 \u043a\u043e\u0434\u0443 \u0438 \u0441\u043b\u0435\u0434\u044f\u0442, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u043c\u0451\u0440\u0436\u0435\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u0431\u0438\u0432\u043a\u0430 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438.<\/strong> \u041f\u0443\u0448 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 <code>master<\/code>, \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u0447. \u0422\u0430\u043a\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043c\u0451\u0440\u0436\u0435\u0439.<\/strong> \u0411\u044b\u0432\u0430\u044e\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u043d\u0430\u0434 \u0432\u0435\u0442\u043a\u043e\u0439 \u0434\u0432\u0435 \u043d\u0435\u0434\u0435\u043b\u0438, \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u043c\u0451\u0440\u0436\u0438\u0442\u044c \u0432 <code>master<\/code> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <strong>Trunk-Based Development<\/strong> \u0435\u0441\u043b\u0438 \u0438 \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b, \u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438 \u043b\u0435\u0433\u043a\u043e \u0440\u0435\u0448\u0430\u0435\u043c\u044b\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430 \u0447\u0442\u043e \u0440\u0443\u0433\u0430\u044e\u0442 <strong>Trunk-Based Development<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u0420\u0430\u0437 \u2014 \u0438 \u0433\u043e\u0442\u043e\u0432\u043e.<\/strong> \u041c\u043e\u0436\u043d\u043e \u0432\u0441\u0451 \u0441\u043b\u043e\u043c\u0430\u0442\u044c \u043e\u0434\u043d\u0438\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043b\u043e\u0436\u043d\u044b\u0439<\/strong> <code>revert<\/code><strong>.<\/strong> \u0412 \u0434\u0435\u043d\u044c \u0434\u0435\u043b\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432, \u0438 \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043e\u043c, \u043e\u0442 HEAD \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <code>revert<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0443\u043b\u043b.<\/strong> \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u043a \u0441\u0435\u0431\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 <code>master<\/code>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u043c\u0451\u0440\u0436\u0430.<\/p>\n<\/li>\n<\/ul>\n<h3>Feature\/Issue Branch Workflow<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f2f\/65c\/f11\/f2f65cf119002eec49b62d8e54ac7d39.png\" alt=\"Feature\/Issue Branch Workflow\" title=\"Feature\/Issue Branch Workflow\" width=\"2800\" height=\"1500\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f2f\/65c\/f11\/f2f65cf119002eec49b62d8e54ac7d39.png\"\/><\/p>\n<div><figcaption><strong>Feature\/Issue Branch Workflow<\/strong><\/figcaption><\/div>\n<\/figure>\n<p><strong>Feature\/Issue Branch Workflow<\/strong> \u2014 \u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 Trunk-Based Development.<\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u0443\u044e \u0444\u0438\u0447\u0443 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0432\u043e\u044f \u0432\u0435\u0442\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0434\u0451\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430, \u0438 \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0432\u0435\u0442\u043a\u0430 \u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <code>master<\/code>.<\/p>\n<p>\u0417\u0430 \u0447\u0442\u043e \u043b\u044e\u0431\u044f\u0442 <strong>Feature\/Issue Branch Workflow<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c.<\/strong> \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0432\u0435\u0442\u043a\u0435 \u0438 \u043d\u0438 \u043e\u0442 \u043a\u043e\u0433\u043e \u043d\u0435 \u0436\u0434\u0451\u0442\u0435 \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0443\u043b\u043b\u0438\u0442\u044c \u0438\u0437 <code>master<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439<\/strong> <code>master<\/code><strong>.<\/strong> \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0443\u043b\u043b\u044f\u0442\u0441\u044f \u0432 <code>master<\/code>, \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0442\u0435\u0441\u0442\u044b, \u0438 \u043c\u0430\u0441\u0442\u0435\u0440 \u0432\u0441\u0435\u0433\u0434\u0430 \u0433\u043e\u0440\u0438\u0442 \u00ab\u0437\u0435\u043b\u0451\u043d\u044b\u043c\u00bb.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430 \u0447\u0442\u043e \u0440\u0443\u0433\u0430\u044e\u0442 <strong>Feature\/Issue Branch Workflow<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u0412\u043f\u0435\u0440\u0435\u0434\u0438 \u043f\u0430\u0440\u043e\u0432\u043e\u0437\u0430.<\/strong> \u0415\u0441\u043b\u0438 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u0440\u0435\u0448\u0438\u043b \u0432\u043c\u0451\u0440\u0436\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432 <code>master<\/code> \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043c\u0451\u0440\u0436 \u0432\u044b, \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0441\u0435\u0431\u0435 <code>master<\/code> \u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u043e \u0441\u043b\u043e\u043c\u0430\u043d\u043d\u044b\u043c\u0438 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0442\u043a\u0443 \u0432 <code>master<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/strong> \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0442\u043e\u043a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0441\u0442\u0438, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0441\u0442\u0435\u0440-\u0432\u0435\u0442\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<h2>Gitflow<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6cb\/2fb\/6c9\/6cb2fb6c9f7898999003c21d46d73091.png\" alt=\"Gitflow\" title=\"Gitflow\" width=\"2800\" height=\"1618\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6cb\/2fb\/6c9\/6cb2fb6c9f7898999003c21d46d73091.png\"\/><\/p>\n<div><figcaption>Gitflow<\/figcaption><\/div>\n<\/figure>\n<p><strong>Gitflow<\/strong> \u2014 \u0447\u0443\u0442\u044c \u043b\u0438 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f Gitflow \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u0435\u0442\u043a\u0438: <code>master<\/code> \u0438 <code>develop<\/code>. \u0412 \u0432\u0435\u0442\u043a\u0435 master \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u043e\u0442\u043e\u0432\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u0432 production (\u043f\u0440\u043e\u0434). \u0412 \u0432\u0435\u0442\u043a\u0435 <code>develop<\/code> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043e\u0434\u0430 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0449\u0451 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u044b \u0432 \u043f\u0440\u043e\u0434.<\/p>\n<p>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Gitflow: \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u043f\u0440\u0438\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0432\u0435\u0442\u043a\u0443 <code>develop<\/code>, \u0438 \u0432\u0441\u0435 \u0442\u0440\u0443\u0434\u044f\u0442\u0441\u044f \u0432 \u043d\u0435\u0439. \u041e\u0442 \u0432\u0435\u0442\u043a\u0438 <code>develop<\/code> \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0442\u0432\u043e\u0434\u044f\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0435\u0442\u043a\u0438 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u2014 \u043f\u043e \u0441\u0443\u0442\u0438 <strong>Feature\/Issue Branch Workflow<\/strong>, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 <code>develop<\/code>, \u0430 \u043d\u0435 <code>master<\/code>. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043a\u043e\u0434\u044f\u0442 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0432\u0435\u0442\u043a\u0430\u0445, \u0430 \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 <code>develop<\/code>. \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u043f\u0440\u0438\u043d\u0442\u0430 \u043e\u0442 \u0432\u0435\u0442\u043a\u0438 <code>develop<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f release-\u0432\u0435\u0442\u043a\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u0435 \u043a \u043f\u0440\u043e\u0434\u043e\u0432\u043e\u0439 \u0441\u0440\u0435\u0434\u0435.<\/p>\n<blockquote>\n<p>Hotfix-\u0432\u0435\u0442\u043a\u0438 \u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 <code>release<\/code>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u043e\u0432\u044b\u0435 feature-\u0432\u0435\u0442\u043a\u0438 \u0432 \u0440\u0435\u043b\u0438\u0437 \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442.  <\/p>\n<\/blockquote>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u043f\u043e\u0447\u0438\u043d\u0438\u043b\u0438, \u0432\u043b\u0438\u043b\u0438 \u0444\u0438\u0447\u0438 \u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u043b\u0438\u0437, \u0432\u0435\u0442\u043a\u0430 <code>release<\/code> \u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <code>master<\/code> \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 <code>develop<\/code>, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0433\u043e\u0432 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u0435\u043b\u0438\u0441\u044c \u043e\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0417\u0430 \u0447\u0442\u043e \u043b\u044e\u0431\u044f\u0442 <strong>Gitflow<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/strong> \u041c\u043e\u0434\u0435\u043b\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u043e\u043b\u044c\u0448\u0438\u0445, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<\/li>\n<li>\n<p>\u00ab<strong>\u0412\u044b\u0431\u043e\u0440 \u0434\u0436\u0443\u043d\u0430<\/strong>\u00bb<strong>.<\/strong> Gitflow \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0430 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 junior-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0434\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0440\u0435\u043b\u0438\u0437.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430 \u0447\u0442\u043e \u0440\u0443\u0433\u0430\u044e\u0442 <strong>Gitflow<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c.<\/strong> \u041c\u043e\u0434\u0435\u043b\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 MVP, \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 GitHub \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u0430 \u043d\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u044e \u00ab\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0451\u0440\u0436 \u0432 \u043c\u0430\u0441\u0442\u0435\u0440 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c\u0438\u00bb. \u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 (\u0438\u043b\u0438 \u043d\u0435\u0442) \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<hr\/>\n<h3>Merge \u0438 rebase<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043e\u0442\u0432\u0435\u043b\u0438 \u0441\u0432\u043e\u044e \u0432\u0435\u0442\u043a\u0443 \u043e\u0442 <code>main<\/code>. \u0412\u043d\u043e\u0441\u0438\u043c \u0432 \u043d\u0435\u0451 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u043c\u043c\u0438\u0442\u0438\u043c \u0438 \u0443\u0436\u0435 \u0445\u043e\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0451\u0440\u0436 \u0432 <code>main<\/code>, \u043a\u0430\u043a\u2026 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432\u043d\u043e\u0441\u044f\u0442 \u0441\u0432\u043e\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0430\u0441.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ceb\/600\/32b\/ceb60032b3a4ce682661433f509fb18f.png\" alt=\"\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0430\" title=\"\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0430\" width=\"2800\" height=\"1592\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ceb\/600\/32b\/ceb60032b3a4ce682661433f509fb18f.png\"\/><\/p>\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0430\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 main-\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 \u0441\u0432\u043e\u044e \u0432\u0435\u0442\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>git merge<\/code> \u0438\u043b\u0438 <code>git rebase<\/code>:<\/p>\n<ul>\n<li>\n<p><code>git merge<\/code> \u2014 \u043f\u043e\u043c\u0451\u0440\u0436\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0435\u0442\u043a\u0438, \u0441\u043e\u0437\u0434\u0430\u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 merge-\u043a\u043e\u043c\u043c\u0438\u0442.<\/p>\n<\/li>\n<li>\n<p><code>git rebase<\/code> \u2014 \u0437\u0430\u043d\u043e\u0432\u043e \u043d\u0430\u043b\u043e\u0436\u0438\u0442 \u043d\u0430\u0448\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u043f\u043e\u0432\u0435\u0440\u0445 \u0442\u043e\u0439 \u0432\u0435\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c \u0432 \u0441\u0432\u043e\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 merge \u0438 rebase \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0435\u0442\u043a\u0438 main \u0438 merge \u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043b\u043e\u0433.<\/p>\n<pre><code>$ git log --all --graph --oneline:<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/36f\/ce3\/b96\/36fce3b96407c8028b35a5417ece9bf1.png\" width=\"2800\" height=\"984\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/36f\/ce3\/b96\/36fce3b96407c8028b35a5417ece9bf1.png\"\/><\/figure>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432\u0435\u0442\u043a\u0430 <code>merge<\/code> \u043e\u0442\u0432\u0435\u0434\u0435\u043d\u0430 \u043e\u0442 <code>main<\/code>, \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0430\u0441\u044c, \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u043a\u0430\u043a \u0432 <code>main<\/code>, \u0442\u0430\u043a \u0438 \u0432 <code>merge<\/code>.<\/p>\n<p>\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 <code>main<\/code> \u0432 \u0432\u0435\u0442\u043a\u0443 <code>merge<\/code>.<\/p>\n<h2>Merge  <\/h2>\n<p>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0432\u0435\u0442\u043a\u0443 merge: <\/p>\n<pre><code>$ git checkout merge<\/code><\/pre>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u0432\u0435\u0442\u043a\u0443 <code>main<\/code> (\u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u0431\u044b\u043b\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u0435\u0442\u043a\u0438):<\/p>\n<pre><code class=\"bash\">$ git fetch origin main                                                                           \ue0b2 \u2714 \ue0b3 4 \u2699 \ue0b2 6421 \ue0b2 11:08:28 From github.com:ifireice\/git  * branch            main       -> FETCH_HEAD<\/code><\/pre>\n<p>\u041c\u0451\u0440\u0436\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 <code>main<\/code> \u0432 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0432\u0435\u0442\u043a\u0443.<\/p>\n<pre><code class=\"bash\">$ git merge main Merge branch 'main' into merge # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.  Merge made by the 'recursive' strategy.  README.md | 9 ---------  1 file changed, 9 deletions(-)<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u0433 <code>$ git log --all --graph --oneline<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c4e\/c0a\/e69\/c4ec0ae699e3c61731f2e1116a795f7f.png\" width=\"2800\" height=\"1056\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c4e\/c0a\/e69\/c4ec0ae699e3c61731f2e1116a795f7f.png\"\/><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c \u043f\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438, \u0447\u0442\u043e \u0434\u0432\u0435 \u0432\u0435\u0442\u043a\u0438 \u0441\u043c\u0451\u0440\u0436\u0435\u043d\u044b \u0432 <code>merge<\/code> \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 merge-\u043a\u043e\u043c\u043c\u0438\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0445 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b.<\/p>\n<h3>Rebase<\/h3>\n<p>\u041f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <code>main<\/code>:<\/p>\n<pre><code class=\"bash\">$ git fetch origin main                                                                           \ue0b2 \u2714 \ue0b3 4 \u2699 \ue0b2 6421 \ue0b2 11:08:28 From github.com:ifireice\/git  * branch            main       -> FETCH_HEAD<\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c <code>rebase<\/code>:<\/p>\n<pre><code class=\"bash\">$ git rebase main Successfully rebased and updated refs\/heads\/merge.<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u0433 <code>$ git log --all --graph --oneline<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3f4\/143\/6ba\/3f41436bae26a2b20e2f4e2b6ac1cc04.png\" width=\"2800\" height=\"958\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3f4\/143\/6ba\/3f41436bae26a2b20e2f4e2b6ac1cc04.png\"\/><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u043f\u043e\u0432\u0435\u0440\u0445 \u0432\u0435\u0442\u043a\u0438 <code>main<\/code> \u0437\u0430\u043d\u043e\u0432\u043e \u2014 \u0431\u0443\u0434\u0442\u043e \u043c\u044b \u043e\u0442\u0432\u0435\u043b\u0438 \u0432\u0435\u0442\u043a\u0443 <code>merge<\/code> \u043e\u0442 <code>main<\/code> \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e.<\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e merge-\u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u043d\u0435\u0442.<\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e <code>git rebase<\/code> \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0438 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c <code>git push force<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>rebase<\/code> \u043d\u0430 \u0432\u0435\u0442\u043a\u0430\u0445, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0442\u043e, \u0447\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0430\u0441\u0435\u043d <code>rebase<\/code>, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043d\u0438\u0436\u0435.<\/p>\n<h3>\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432<\/h3>\n<p>\u041f\u0440\u0438 \u043c\u0451\u0440\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0432\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e.<\/p>\n<p>\u041d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u043b\u0438 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432\u0430\u0442\u044c. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 GitHub \u0441\u043e\u043e\u0431\u0449\u0438\u0442 \u043e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a82\/513\/4dd\/a825134dd645fa437321f5765d2c09ff.png\" alt=\"\u041d\u0435\u0433\u043e\u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0451\u0440\u0436, \u043f\u043e\u043a\u0430 \u0431\u043e\u0434\u0440\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b\u00a0\" title=\"\u041d\u0435\u0433\u043e\u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0451\u0440\u0436, \u043f\u043e\u043a\u0430 \u0431\u043e\u0434\u0440\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b\u00a0\" width=\"915\" height=\"252\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a82\/513\/4dd\/a825134dd645fa437321f5765d2c09ff.png\"\/><\/p>\n<div><figcaption>\u041d\u0435\u0433\u043e\u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0451\u0440\u0436, \u043f\u043e\u043a\u0430 \u0431\u043e\u0434\u0440\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b\u00a0<\/figcaption><\/div>\n<\/figure>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442.<\/p>\n<h4>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430<\/h4>\n<ol>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a A, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0443:<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8f9\/90d\/6dc\/8f990d6dc2cca067b0eda4bb8f5969f6.png\" width=\"1018\" height=\"338\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8f9\/90d\/6dc\/8f990d6dc2cca067b0eda4bb8f5969f6.png\"\/><\/figure>\n<ol start=\"2\">\n<li>\n<p>\u0412 \u044d\u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a B \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435 \u0432\u043d\u0451\u0441 \u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0438\u043b \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u043e\u0439:  <\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dc8\/eca\/6d5\/dc8eca6d5d1bf0202056c5ef41b0f5f4.png\" width=\"1022\" height=\"316\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dc8\/eca\/6d5\/dc8eca6d5d1bf0202056c5ef41b0f5f4.png\"\/><\/figure>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0432\u043b\u0438\u0442\u044c \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 <code>main<\/code> \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Git \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0441\u0430\u043c, \u2014 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435. \u042d\u0442\u0438\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>$ git log --all --graph<\/code> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dba\/519\/6d6\/dba5196d6ea3bceb342d73b8ee7f9605.png\" width=\"2800\" height=\"2330\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dba\/519\/6d6\/dba5196d6ea3bceb342d73b8ee7f9605.png\"\/><\/figure>\n<p>\u0418\u0449\u0435\u043c \u0441\u0432\u043e\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u044b<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0451\u0440\u0436\u0438\u0442\u044c \u0432\u0435\u0442\u043a\u0443 <code>main<\/code> \u0432 \u043d\u0430\u0448\u0443 \u0432\u0435\u0442\u043a\u0443 <code>feature-b<\/code>, \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442 \u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0441\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0438 \u043d\u0430\u0448\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0432\u0435\u0442\u043a\u0430 \u2014 <code>feature-b<\/code>.<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c <code>$ git checkout feature-b<\/code>.<\/p>\n<blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0434\u0430\u0451\u0442\u0435\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043f\u0430\u0443\u0437\u0443 \u0438 \u043f\u0440\u043e\u0447\u0442\u0438\u0442\u0435 <a href=\"https:\/\/habr.com\/ru\/companies\/yandex_praktikum\/articles\/700708\/\">\u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438<\/a>. \u0418\u043d\u0430\u0447\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0441\u0442\u0430\u043d\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u2014 \u043d\u0435\u0442.<\/p>\n<\/blockquote>\n<p>\u041c\u0451\u0440\u0436\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 \u0432\u0435\u0442\u043a\u0438 <code>main<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>$ git merge main<\/code>:<\/p>\n<pre><code class=\"bash\">$ git merge main Auto-merging README.md CONFLICT (content): Merge conflict in README.md Automatic merge failed; fix conflicts and then commit the result.<\/code><\/pre>\n<p>Git \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043f\u043e\u043c\u0451\u0440\u0436\u0438\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0432 \u0447\u0451\u043c \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/p>\n<pre><code class=\"bash\">$ git status On branch feature-b Your branch is up to date with 'origin\/feature-b'.`  You have unmerged paths. (fix conflicts and run \"git commit\") (use \"git merge --abort\" to abort the merge)`  Unmerged paths: (use \"git add &lt;file>...\" to mark resolution) both modified:   [README.md](http:\/\/readme.md\/)`  no changes added to commit (use \"git add\" and\/or \"git commit -a\")`<\/code><\/pre>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u043e\u0431\u0435\u0438\u0445 \u0432\u0435\u0442\u043a\u0430\u0445 \u0435\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>README.md<\/code>. \u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0435\u0433\u043e \u043b\u044e\u0431\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u0438 \u043d\u0430\u0439\u0434\u0451\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0435\u0442\u043a\u0443 \u043e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fbf\/2d4\/a19\/fbf2d4a194ae81a58f96dd032b956ef0.png\" width=\"898\" height=\"205\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fbf\/2d4\/a19\/fbf2d4a194ae81a58f96dd032b956ef0.png\"\/><\/figure>\n<p>\u0422\u0430\u043a \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 VS Code \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u043e\u0439, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u044b\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c.<\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0444\u0430\u0439\u043b \u043a \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c. \u041f\u0443\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e98\/b9a\/672\/e98b9a672a0955e70764a86ac9cf34fb.png\" width=\"898\" height=\"185\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e98\/b9a\/672\/e98b9a672a0955e70764a86ac9cf34fb.png\"\/><\/figure>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b \u0432 \u0438\u043d\u0434\u0435\u043a\u0441 \u0438 \u0437\u0430\u043a\u043e\u043c\u043c\u0438\u0442\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bbe\/59b\/caf\/bbe59bcafafa049c20d849fd07eaf6be.png\" width=\"2800\" height=\"1526\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bbe\/59b\/caf\/bbe59bcafafa049c20d849fd07eaf6be.png\"\/><\/figure>\n<p>Git \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0435, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c:<\/p>\n<pre><code class=\"bash\">$ git commit [feature-b 151a787] Merge branch 'main' into feature-b<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>$ git log --all --graph<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/164\/075\/82c\/16407582c33b3b0b448d9adfaaad9dc3.png\" width=\"2800\" height=\"2658\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/164\/075\/82c\/16407582c33b3b0b448d9adfaaad9dc3.png\"\/><\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 merge-\u043a\u043e\u043c\u043c\u0438\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0438\u0432\u0430\u0435\u0442 \u0434\u0432\u0435 \u0432\u0435\u0442\u043a\u0438. \u0412 \u043d\u0451\u043c \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0448 pull-\u0440\u0435\u043a\u0432\u0435\u0441\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0434\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0432\u0435\u0442\u043a\u0438. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c: <code>$ git push<\/code>.<\/p>\n<p>\u0418\u2026 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442, \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043c\u0451\u0440\u0436\u0438\u0442\u044c pull-\u0440\u0435\u043a\u0432\u0435\u0441\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/90e\/069\/7cb\/90e0697cb2b4ef8884512a3d83ccb386.png\" width=\"775\" height=\"324\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/90e\/069\/7cb\/90e0697cb2b4ef8884512a3d83ccb386.png\"\/><\/figure>\n<h3>Squash \u2014 \u0443\u0431\u043e\u0440\u043a\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432<\/h3>\n<p>Squash \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0438 \u043f\u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432\u0435\u0442\u043a\u0438 \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0439 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0430\u0434 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u043a\u043e\u043c\u043c\u0438\u0442\u0438\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u0443\u0441\u043e\u0447\u0435\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u0438\u0434\u0438\u043c \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/763\/656\/433\/763656433566a4a6b3c349749751217a.png\" width=\"2800\" height=\"1714\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/763\/656\/433\/763656433566a4a6b3c349749751217a.png\"\/><\/figure>\n<p>\u0425\u043e\u0442\u0438\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442\u044b 1, 2 \u0438 3 \u0432 \u043e\u0434\u0438\u043d-\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c <code>$ git rebase -i HEAD~3<\/code>:<\/p>\n<ul>\n<li>\n<p><code>git rebase -i<\/code> \u2014 \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Git, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432\u0435\u0442\u043a\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>git rebase -i<\/code> \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043e\u0442\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0443\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.  <\/p>\n<\/blockquote>\n<ul>\n<li>\n<p><code>HEAD<\/code> \u2014 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043a\u043e\u043c\u043c\u0438\u0442.<\/p>\n<\/li>\n<li>\n<p><code>~n<\/code> \u2014 \u043e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u0432\u0437\u044f\u0442\u044c n \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>HEAD~3<\/code> \u2014 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0441 \u0442\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440. \u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0437\u0430\u0445\u0432\u0430\u0442\u0438\u043b\u0438 \u0442\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0441\u043a\u043b\u0435\u0438\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cee\/891\/672\/cee891672b9de978d087b3cdee9cf3f1.png\" width=\"2800\" height=\"1890\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cee\/891\/672\/cee891672b9de978d087b3cdee9cf3f1.png\"\/><\/figure>\n<p><code>git rebase -i<\/code> \u2014 \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 (\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0446\u0438\u0439), \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e squash.<\/p>\n<p>\u0421\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u044b:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d85\/531\/55f\/d8553155f995200c38222aad6c6b17d6.png\" width=\"2800\" height=\"1964\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d85\/531\/55f\/d8553155f995200c38222aad6c6b17d6.png\"\/><\/figure>\n<p>\u041e\u0442\u043c\u0435\u043d\u044f\u0435\u043c \u0434\u0432\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>squash<\/code> \u0438 <code>s<\/code>.<\/p>\n<p>\u041e\u0431\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u0431\u0443\u0434\u0443\u0442 \u0441\u043a\u043b\u0435\u0435\u043d\u044b \u0441 \u0442\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u0435\u0447\u0435\u043d <code>pick<\/code>.<\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c.<\/p>\n<p><code>git rebase -i<\/code> \u043e\u0442\u043a\u0440\u043e\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043e\u043a\u043d\u043e:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/60c\/00a\/99d\/60c00a99db8551de74be0cc1e2fffa59.png\" width=\"2800\" height=\"1944\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/60c\/00a\/99d\/60c00a99db8551de74be0cc1e2fffa59.png\"\/><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 <code>$ git log --graph<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/48b\/c38\/6ae\/48bc386aec75bcb090bb43d1608ffd85.png\" width=\"2800\" height=\"1376\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/48b\/c38\/6ae\/48bc386aec75bcb090bb43d1608ffd85.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u0440\u0451\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u043e\u0434\u0438\u043d. \u041a\u0430\u043a \u043c\u044b \u0438 \u0445\u043e\u0442\u0435\u043b\u0438.<\/p>\n<p>\u0412 \u0434\u0432\u0443\u0445 \u0441\u043b\u043e\u0432\u0430\u0445 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b <code>squash<\/code>:<\/p>\n<ol>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>$ git rebase -i &lt;BASE><\/code>, \u0433\u0434\u0435 <code>&lt;BASE><\/code> \u2014 \u044d\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0435\u0442\u043a\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0440\u044b\u043b\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432 \u0432\u0435\u0442\u043a\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441 \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u043c\u0438: \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0438\u0445 \u043f\u043e\u0440\u044f\u0434\u043e\u043a, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u043b\u0438 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0444\u0430\u0439\u043b \u0438 \u0437\u0430\u043a\u0440\u044b\u043b\u0438 \u0435\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p>Git \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0415\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 squash \u2014 \u0441\u0445\u043b\u043e\u043f\u044b\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u043f\u0440\u0438 \u043c\u0451\u0440\u0436\u0435<\/h4>\n<p><code>squash<\/code> \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043c\u0451\u0440\u0436\u0438\u0442\u0435 \u0432\u0435\u0442\u043a\u0443 \u0432 <code>main<\/code>. \u0412 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0435\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e, \u043d\u043e \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439 \u0438 \u0447\u0438\u0441\u0442\u043e\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 \u043f\u0440\u0438 \u043c\u0451\u0440\u0436\u0435 \u0432\u0435\u0442\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0445\u043b\u043e\u043f\u043d\u0443\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u0432 \u043e\u0434\u0438\u043d.<\/p>\n<p>\u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0435\u043b\u0438 \u0432 \u0432\u0435\u0442\u043a\u0435 <code>feature-c<\/code> \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0434\u0432\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c46\/810\/084\/c46810084bf1a996e3c07c2efa61da19.png\" width=\"2800\" height=\"1412\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c46\/810\/084\/c46810084bf1a996e3c07c2efa61da19.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0445\u043e\u0442\u0438\u043c \u043c\u0451\u0440\u0436\u0438\u0442\u044c \u0432\u0435\u0442\u043a\u0443 <code>feature-c<\/code> \u0432 <code>main<\/code>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u0432\u0435\u0442\u043a\u0443 <code>main<\/code> \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c <code>$ git merge --squash target_branch_name<\/code>:<\/p>\n<pre><code class=\"bash\">$ git merge --squash origin\/feature-c  Updating bb0b109..e7989c7 Fast-forward Squash commit -- not updating HEAD  README.md | 7 +++++++  1 file changed, 7 insertions(+)<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>$ git commit<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/439\/ab5\/f1a\/439ab5f1aa9cabd915a31fcfd1c27a2d.png\" width=\"2800\" height=\"1492\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/439\/ab5\/f1a\/439ab5f1aa9cabd915a31fcfd1c27a2d.png\"\/><\/figure>\n<p>\u0418 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u044e <code>$ git log --graph<\/code>:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/399\/6e1\/d16\/3996e1d1639fb0ce860776805ee46406.png\" width=\"2800\" height=\"1264\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/399\/6e1\/d16\/3996e1d1639fb0ce860776805ee46406.png\"\/><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u043c\u0451\u0440\u0436\u0438\u043b\u0438 \u043d\u0430\u0448\u0443 \u0432\u0435\u0442\u043a\u0443 <code>feature-c<\/code> \u0441 <code>main<\/code> \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f <code>--squash<\/code>.<\/p>\n<h3>\u0421\u0436\u0430\u0442\u0438\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432 GitHub<\/h3>\n<p>GitHub \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0441\u0436\u0438\u043c\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u043f\u0440\u0438 \u043c\u0451\u0440\u0436\u0435 \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430 (\u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0437\u0430\u0431\u044b\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c PR).<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/740\/30d\/261\/74030d261332c5b1ae9a81f9b73db373.png\" width=\"1876\" height=\"1426\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/740\/30d\/261\/74030d261332c5b1ae9a81f9b73db373.png\"\/><\/figure>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f <code>squash<\/code>, \u0430 \u043f\u043e\u0442\u043e\u043c <code>merge<\/code>.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c2a\/8fd\/63c\/c2a8fd63c6f4428817bd063ab6d333a6.png\" width=\"1882\" height=\"902\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c2a\/8fd\/63c\/c2a8fd63c6f4428817bd063ab6d333a6.png\"\/><\/figure>\n<p>\u0418 \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0432\u0443\u0445 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8a3\/cd4\/51c\/8a3cd451c5e68c69f7fee870669abb0f.png\" width=\"1042\" height=\"276\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8a3\/cd4\/51c\/8a3cd451c5e68c69f7fee870669abb0f.png\"\/><\/figure>\n<h3>Cherry-pick \u2014 \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0439 \u043c\u0451\u0440\u0436<\/h3>\n<p><code>git cherry-pick<\/code> \u2014 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Git, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 \u043a\u043e\u043c\u043c\u0438\u0442(\u044b) \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e.<\/p>\n<p>\u041e\u043d\u0430 \u0431\u0435\u0440\u0451\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u0435, \u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0432\u0435\u0442\u043a\u0443.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0432 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u0442\u0430\u043a: \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0435\u0442\u043a\u0430 <code>stable<\/code> \u0441\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043f\u0440\u043e\u0434\u0435, \u0438 \u0432\u0435\u0442\u043a\u0430 <code>main<\/code>, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0430\u043c\u0430\u044f \u0441\u0432\u0435\u0436\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430.<\/p>\n<p>\u0412\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d-\u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u043d\u0430\u0448\u043b\u0438 \u0431\u0430\u0433. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b \u0431\u0430\u0433 \u0432 <code>main<\/code>, \u043d\u043e \u0431\u0430\u0433 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u043c, \u0447\u0442\u043e \u0438 \u043d\u0430 \u043f\u0440\u043e\u0434\u0435 \u0435\u0433\u043e \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0447\u0438\u043d\u0438\u0442\u044c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043a\u0430\u0442\u0438\u043c \u0432\u0435\u0442\u043a\u0443 main \u0432 \u043f\u0440\u043e\u0434, \u0442\u0443\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0451\u0442 \u0435\u0449\u0451 \u0438 \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432 <code>main<\/code>.<\/p>\n<blockquote>\n<p>\u00a0\u041a \u0441\u043b\u043e\u0432\u0443, \u0441\u0440\u043e\u0447\u043d\u043e \u0438 \u0432 \u0441\u043f\u0435\u0448\u043a\u0435 \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u2014 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u043b\u0443\u0447\u0448\u0430\u044f \u0438\u0434\u0435\u044f (\u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u0430\u0442\u0438\u0442\u044c \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u044b\u0445 \u0431\u0430\u0433\u043e\u0432).<\/p>\n<\/blockquote>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u043f\u043e\u043c\u0451\u0440\u0436\u0438\u0442\u044c \u0432 \u0432\u0435\u0442\u043a\u0443 <code>stable<\/code> \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e (\u0438 \u043f\u043e\u0442\u043e\u043c \u0443\u0436\u0435 \u0432\u044b\u043a\u0430\u0442\u0438\u0442\u044c \u0432\u0435\u0442\u043a\u0443 <code>stable<\/code> \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d).<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 <code>$ git log --all --graph<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ef3\/228\/0ea\/ef32280ea7cebc3d917c8e3488b4897f.png\" width=\"2800\" height=\"1376\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ef3\/228\/0ea\/ef32280ea7cebc3d917c8e3488b4897f.png\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0451\u0440\u0436\u0438\u043c <code>main<\/code> \u0432 <code>stable<\/code>, \u0442\u043e \u0438 \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u0444\u0438\u0447\u0435\u0439, \u0438 \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u043e\u043c \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432 \u043f\u0440\u043e\u0434. \u0410 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u043e\u043c.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u00ab\u043c\u0451\u0440\u0436 \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u0443\u00bb, \u0443 Git \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0430<a href=\"https:\/\/git-scm.com\/docs\/git-cherry-pick\"> <u>cherry-pick<\/u><\/a> (\u043c\u043e\u0436\u043d\u043e \u043f\u043e-\u0440\u0443\u0441\u0441\u043a\u0438, \u0432\u0430\u0441 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0439\u043c\u0443\u0442).<\/p>\n<ol>\n<li>\n<p>\u0421\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0412 <code>$ git log<\/code> \u043d\u0430\u0439\u0434\u0451\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u043e\u043c\u043c\u0438\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u043f\u043e\u043c\u0451\u0440\u0436\u0438\u0442\u044c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e <code>4215d16f17f52e5279f84df6b89dd3d7b423cac4<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u0432 \u0432\u0435\u0442\u043a\u0443 <code>stable<\/code>: <code>$ git checkout stable<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0435\u0440\u0440\u0438-\u043f\u0438\u043a\u043d\u0435\u043c \u043d\u0430\u0448 \u043a\u043e\u043c\u043c\u0438\u0442:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"bash\">$ git cherry-pick 4215d16f17f52e5279f84df6b89dd3d7b423cac4 Auto-merging README.md [stable 2e07d5a] fix bug  Date: Wed Mar 29 09:33:51 2023 +0300  1 file changed, 2 deletions(-)<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 Git: \u0432\u043e\u0437\u044c\u043c\u0451\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0432 \u043a\u043e\u043c\u043c\u0438\u0442\u0435 <code>4215d16f17f52e5279f84df6b89dd3d7b423cac4<\/code>, \u0438 \u043d\u0430\u043b\u043e\u0436\u0438\u0442 \u0438\u0445 \u043d\u0430 \u0441\u0430\u043c\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043a\u043e\u043c\u043c\u0438\u0442 \u0432 \u0432\u0435\u0442\u043a\u0435 <code>stable<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c <code>$ git log --all --graph<\/code>, \u0442\u043e \u043d\u0430\u0448 \u043a\u043e\u043c\u043c\u0438\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u043d\u043e\u0432\u044b\u0439, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442 (\u0430 \u043d\u0435 \u043a\u0430\u043a \u043a\u043e\u043c\u043c\u0438\u0442-\u043c\u0451\u0440\u0436).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/258\/8d0\/735\/2588d0735f00b4701a09ab2d0e81e23b.png\" width=\"2800\" height=\"1240\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/258\/8d0\/735\/2588d0735f00b4701a09ab2d0e81e23b.png\"\/><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c <code>$ git push<\/code><\/p>\n<h3>Revert \u0438 reset<\/h3>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u043f\u043e\u043f\u0430\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u0438 \u0431\u0430\u0433, \u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441 \u0431\u0430\u0433\u043e\u043c.<\/p>\n<p><a href=\"https:\/\/git-scm.com\/docs\/git-revert\"><u>git revert<\/u><\/a> \u0438<a href=\"https:\/\/git-scm.com\/docs\/git-reset\"> <u>git reset<\/u><\/a> \u2014 \u044d\u0442\u043e \u0434\u0432\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043e\u0442\u043c\u0435\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 Git.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e, \u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 <code>git revert<\/code> \u0438 <code>git reset<\/code> \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>git reset<\/code> \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 \u0432\u0430\u0441 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432, a git revert \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u043e\u0442\u043c\u0435\u043d\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<h3>Revert<\/h3>\n<p><code>$ git revert<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u0435. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 <code>git reset<\/code>, \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432.<\/p>\n<p>\u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c <code>git log --oneline<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/39f\/680\/765\/39f68076541d7f7fe9406e6e5b1c1ef1.png\" width=\"2800\" height=\"950\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/39f\/680\/765\/39f68076541d7f7fe9406e6e5b1c1ef1.png\"\/><\/figure>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c revert \u0434\u0432\u0443\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u2014 <code>4215d16<\/code> \u0438 <code>3ce8c50<\/code>:<\/p>\n<pre><code class=\"bash\">$ git revert 4215d16 3ce8c50.<\/code><\/pre>\n<p>Git \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043c\u043c\u0438\u0442-\u043c\u0435\u0441\u0441\u0435\u0434\u0436\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0430:<\/p>\n<pre><code class=\"bash\">$ git revert 4215d16 3ce8c50 [revert 98a0bfc] Revert \"fix bug\"  1 file changed, 2 insertions(+) [revert 7b330be] Revert \"update ReadMe.md\"  1 file changed, 1 deletion(-)<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c <code>$ git log --oneline<\/code>:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/75d\/859\/9a4\/75d8599a4bdc63dc94ede13b824903bd.png\" width=\"2800\" height=\"1008\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/75d\/859\/9a4\/75d8599a4bdc63dc94ede13b824903bd.png\"\/><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0441\u043e\u0440\u044f\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0438 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c, <code>revert<\/code> \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0430 <code>-n<\/code>. \u041d\u0443\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u043a\u043e\u043c\u043c\u0438\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">$ git revert -n 4215d16 3ce8c50  $ git commit Revert \"update ReadMe.md\"  This reverts commit 3ce8c505f9651d548454c8856fdfee86e92a123f.  # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch revert # You are currently reverting commit 3ce8c50. # # Changes to be committed: #       modified:   README.md #  $ git log --oneline 8b6752c (HEAD -> revert) Revert \"update ReadMe.md\" 4215d16 (main) fix bug 3ce8c50 update ReadMe.md 80dcb32 Merge pull request #13 from ifireice\/feature-b 338d0e9 (origin\/feature-b) Merge branch 'main' into feature-b 1e2c3a0 fix typo 2db25fc drop line 9e8b1e5 Merge pull request #1 from ifireiceya\/fix-misprint d2fa945 \u041f\u043e\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0443 0f75a77 Init cdb80a7 Initial commit<\/code><\/pre>\n<p>\u041f\u0440\u0438 <code>revert<\/code> \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044c <code>HEAD~&lt;\u0447\u0438\u0441\u043b\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432><\/code>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432, \u0442\u043e \u0435\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c:<\/p>\n<p><code>$ git revert -n HEAD~5..HEAD~2<\/code> (\u043f\u0435\u0440\u0432\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442..\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043a\u043e\u043c\u043c\u0438\u0442).<\/p>\n<h3>Reset<\/h3>\n<p><code>$ git reset<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043c\u0435\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043f\u0440\u0438\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043c\u043c\u0438\u0442\u0435, \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e. \u041f\u043e \u0441\u0443\u0442\u0438, \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442 <code>HEAD<\/code> \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442.<\/p>\n<p>\u0423 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0435\u0451 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p><code>--soft<\/code> \u2014 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433. C \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442 \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435.<\/p>\n<\/li>\n<li>\n<p><code>--mixed<\/code>, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 &#8212;soft, \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u043c\u0438\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0438\u043d\u0434\u0435\u043a\u0441. \u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 git add \u043f\u0435\u0440\u0435\u0434 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u044e revert.<\/p>\n<\/li>\n<li>\n<p><code>--hard<\/code> \u2014 \u043a\u0440\u0430\u0439\u043d\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u041e\u043d \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043c\u0438\u0442, \u043d\u043e \u0438 \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0432\u043d\u0435\u0441\u0451\u043d\u043d\u044b\u0435 \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0434\u043e \u043d\u0435\u0433\u043e. \u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0435\u043b\u044c\u0437\u044f.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0427\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0442\u0430\u043a \u0441 reset<\/h4>\n<p>\u041e\u0442\u0432\u0435\u0434\u0451\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 reset \u0438 \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0432 \u043d\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>$ git checkout -b reset<\/code>. \u0412\u043d\u0435\u0441\u0451\u043c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0448\u0438\u043c. \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 <code>$ git log --oneline<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dcd\/86b\/775\/dcd86b7751e6969366135ac627627da5.png\" width=\"2800\" height=\"1072\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dcd\/86b\/775\/dcd86b7751e6969366135ac627627da5.png\"\/><\/figure>\n<p>\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0432\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u0430: <code>c314848<\/code> \u0438 <code>3391dc8<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c <code>$ git reset dddcea7<\/code>.<\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0451 \u0440\u0430\u0437 <code>$ git log --oneline<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b61\/525\/21b\/b6152521b5f16f5396769992051838fe.png\" width=\"2800\" height=\"984\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b61\/525\/21b\/b6152521b5f16f5396769992051838fe.png\"\/><\/figure>\n<p>\u041a\u043e\u043c\u043c\u0438\u0442\u044b \u043f\u0440\u043e\u043f\u0430\u043b\u0438, \u0432\u0440\u043e\u0434\u0435 \u0432\u0441\u0451 \u043e\u043a.<\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0448\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"bash\">$ git push      To github.com:ifireice\/git.git  ! [rejected]        reset -> reset (non-fast-forward) error: failed to push some refs to 'github.com:ifireice\/git.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.<\/code><\/pre>\n<p>Git \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043d\u0435 \u0434\u0430\u0451\u0442 \u0437\u0430\u043f\u0443\u0448\u0438\u0442\u044c \u0438 \u043d\u0430\u043c\u0435\u043a\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0427\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0442\u0430\u043a?<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u0448 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0432\u0435\u0442\u043a\u043e\u0439, \u0447\u0442\u043e \u0438 \u043c\u044b.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u0432\u0435\u0442\u043a\u0443 <code>reset<\/code>.<\/p>\n<p>\u041a\u043e\u043b\u043b\u0435\u0433\u0430 \u0432\u043d\u0451\u0441 \u0432 \u043d\u0435\u0451 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0443\u0448\u0438\u0442 \u0438\u0445:<\/p>\n<pre><code class=\"bash\">$ git commit -am \"added changes from a colleague\" [main 50bd1e1] added changes from a colleague  1 file changed, 1 insertion(+)  $ git push                        Enumerating objects: 5, done. Counting objects: 100% (5\/5), done. Delta compression using up to 12 threads Compressing objects: 100% (3\/3), done. Writing objects: 100% (3\/3), 365 bytes | 365.00 KiB\/s, done. Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (1\/1), completed with 1 local object. To github.com:ifireice\/git.git    dddcea7..50bd1e1  main -> main<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/901\/91c\/6ca\/90191c6ca8a0110c57ee9741e5b41f60.png\" width=\"1321\" height=\"298\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/901\/91c\/6ca\/90191c6ca8a0110c57ee9741e5b41f60.png\"\/><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0432\u0441\u0435 \u0442\u0440\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u0430 (\u0438 \u043d\u0430\u0448\u0438, \u0438 \u043a\u043e\u043b\u043b\u0435\u0433\u0438).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0443\u0448\u0438\u043c \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441 <code>force<\/code>:<\/p>\n<pre><code class=\"bash\">$ git push -f  Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 To github.com:ifireice\/git.git  + f27c52e...dddcea7 reset -> reset (forced update)<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u044e:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c66\/90d\/55d\/c6690d55df067366ca2b3b6d5625d44f.png\" width=\"822\" height=\"295\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c66\/90d\/55d\/c6690d55df067366ca2b3b6d5625d44f.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u043f\u0430\u043b\u0438 \u0432\u0441\u0435 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u044b + \u043f\u0440\u043e\u043f\u0430\u043b \u043a\u043e\u043c\u043c\u0438\u0442 \u043a\u043e\u043b\u043b\u0435\u0433\u0438.<\/p>\n<p>\u0410 \u0443 \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u2014 \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e:<\/p>\n<pre><code class=\"bash\">$ git status                      On branch reset Your branch is up to date with 'origin\/reset'.  nothing to commit, working tree clean<\/code><\/pre>\n<p>\u041e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043a\u043e\u043c\u043c\u0438\u0442 \u0438 \u043f\u0443\u0448\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0435\u0437 <code>force<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f Git \u0432\u0441\u0451 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435:<\/p>\n<pre><code class=\"bash\">$ git commit -am \"delete typo on ReadMe\" [reset 455e520] delete typo on ReadMe  1 file changed, 3 deletions(-)  $ git push  Enumerating objects: 5, done. Counting objects: 100% (5\/5), done. Delta compression using up to 12 threads Compressing objects: 100% (3\/3), done. Writing objects: 100% (3\/3), 314 bytes | 314.00 KiB\/s, done. Total 3 (delta 1), reused 1 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (1\/1), completed with 1 local object. To github.com:ifireice\/git.git    f27c52e..455e520  reset -> reset<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u044e:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b6f\/d90\/9a5\/b6fd909a5fd6f3608bda8f8c18f5b420.png\" width=\"934\" height=\"557\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b6f\/d90\/9a5\/b6fd909a5fd6f3608bda8f8c18f5b420.png\"\/><\/figure>\n<p>\u0422\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u043b\u0438, \u0432\u0435\u0440\u043d\u0443\u043b\u0438\u0441\u044c + \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u043a\u043e\u043b\u043b\u0435\u0433\u0438.<\/p>\n<blockquote>\n<p>\u041a\u0430\u043a \u043e\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c\u0441\u044f? \u0412 GitHub \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u00ab\u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0437\u0430\u0449\u0438\u0442\u044b\u00bb \u043d\u0430 \u0432\u0435\u0442\u043a\u0443. \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u2192 Settings \u2192 Branches \u2192 Add branch protection rules:<\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b66\/f97\/c7a\/b66f97c7a215354aa3a07dff3e6af001.png\" width=\"1254\" height=\"538\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b66\/f97\/c7a\/b66f97c7a215354aa3a07dff3e6af001.png\"\/><\/figure>\n<p>\u0412\u0432\u043e\u0434\u0438\u043c \u0438\u043c\u044f \u0432\u0435\u0442\u043a\u0438 <code>reset<\/code> (\u043d\u043e \u0447\u0430\u0449\u0435 \u0442\u0430\u043a \u00ab\u0437\u0430\u0449\u0438\u0449\u0430\u044e\u0442\u00bb \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443) \u0432 \u043f\u043e\u043b\u0435 <strong>Branch name<\/strong> pattern, \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0435\u043c \u0432\u043d\u0438\u0437 \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 <strong>Allow force pushes<\/strong>. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c <code>force push<\/code> (\u0435\u0441\u043b\u0438 \u043d\u0435 \u0432\u044b\u0431\u0435\u0440\u0435\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 Everyone):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3a4\/d6d\/c8b\/3a4d6dc8b1310f17ddeda09dc7eb5fd3.png\" width=\"809\" height=\"403\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3a4\/d6d\/c8b\/3a4d6dc8b1310f17ddeda09dc7eb5fd3.png\"\/><\/figure>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0443\u0448\u0438\u0442\u044c \u0441 <code>force<\/code> \u043d\u0435\u043b\u044c\u0437\u044f:<\/p>\n<pre><code class=\"bash\">$ git push -f                    Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 remote: error: GH006: Protected branch update failed for refs\/heads\/reset. remote: error: Cannot force-push to this branch To github.com:ifireice\/git.git  ! [remote rejected] reset -> reset (protected branch hook declined) error: failed to push some refs to 'github.com:ifireice\/git.git<\/code><\/pre>\n<p> \u041d\u0430 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u0441 Git \u043f\u043e\u0434\u043e\u0448\u0451\u043b \u043a \u043a\u043e\u043d\u0446\u0443. \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u043e\u043d \u0431\u044b\u043b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0430\u0441!  <\/p>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e \u0438 \u043f\u0440\u043e\u043d\u0438\u043a\u0441\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u044b \u0441 Git. \u0412\u043e\u0442 \u043a\u0440\u0430\u0442\u043a\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u0441\u0430\u043c\u044b\u043c\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043c\u0451\u0440\u0436\u0438\u0442\u044c \u0434\u0432\u0435 \u0432\u0435\u0442\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/git-scm.com\/docs\/git-rebase\">rebase <\/a>\u0438 <a href=\"https:\/\/git-scm.com\/docs\/git-merge\">merge<\/a><code>;<\/code><\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b \u043f\u0440\u0438 \u043c\u0451\u0440\u0436\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0441\u0432\u043e\u0438\u043b\u0438 \u00ab<a href=\"https:\/\/git-scm.com\/docs\/git-cherry-pick\">\u0447\u0435\u0440\u0440\u0438-\u043f\u0438\u043a\u0438\u043d\u0433<\/a>\u00bb \u2014 \u0437\u0430\u0431\u0440\u0430\u043b\u0438 \u043a\u043e\u043c\u043c\u0438\u0442 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0435\u0442\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f <a href=\"https:\/\/git-scm.com\/book\/ru\/v2\/%D0%98%D0%BD%D1%81%D1%82%D1%80%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D1%8B-Git-%D0%9F%D0%B5%D1%80%D0%B5%D0%B7%D0%B0%D0%BF%D0%B8%D1%81%D1%8C-%D0%B8%D1%81%D1%82%D0%BE%D1%80%D0%B8%D0%B8\">squash <\/a>\u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0441\u0445\u043b\u043e\u043f\u043d\u0443\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <a href=\"https:\/\/git-scm.com\/docs\/git-reset\">reset <\/a>\u0438 <a href=\"https:\/\/git-scm.com\/docs\/git-revert\">revert<\/a>.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/728302\/\"> https:\/\/habr.com\/ru\/articles\/728302\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<div class=\"persona\" persona=\"true\">\n<h5 class=\"persona__heading\" persona=\"true\">\u0414\u0430\u0440\u044c\u044f \u041c\u0435\u043b\u0435\u043d\u0446\u043e\u0432\u0430<\/h5>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u0446\u0430 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u042f\u043d\u0434\u0435\u043a\u0441\u0430, \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0430\u0432\u0442\u043e\u0440 \u043a\u0443\u0440\u0441\u0430 \u00ab<a href=\"https:\/\/practicum.yandex.ru\/promo\/devops-course\/?utm_source=pr&amp;utm_medium=content&amp;utm_campaign=pr_content_devops-course_habr&amp;utm_content=14_04_23\"><u>DevOps \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/u><\/a>\u00bb.<\/p>\n<\/div>\n<p>\u041f\u0440\u043e\u0448\u043b\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/habr.com\/ru\/company\/yandex_praktikum\/blog\/700708\/\"><u>\u00ab\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 Git: \u043f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438 \u0432 GitHub\u00bb<\/u><\/a> \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Git \u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c \u0438\u0437 \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 GitHub. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u00ab\u0433\u043e\u0440\u044f\u0447\u0438\u0435\u00bb \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0442\u0440\u0443\u0434\u043e\u0432\u044b\u0435 \u0431\u0443\u0434\u043d\u0438 \u043a\u0443\u0434\u0430 \u0432\u0435\u0441\u0435\u043b\u0435\u0435. \u0418\u043b\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c.  <\/p>\n<h3>\u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/h3>\n<ul>\n<li>\n<p>\u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f, \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u0445 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0432\u0435\u0442\u043e\u043a \u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043d\u0438\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043c\u0451\u0440\u0436\u0438\u043c \u0434\u0432\u0435 \u0432\u0435\u0442\u043a\u0438 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 (<code>rebase<\/code> \u0438 <code>merge);<\/code><\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u043e\u043b\u043a\u043d\u0451\u043c\u0441\u044f \u0441 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430\u043c\u0438 \u043f\u0440\u0438 \u043c\u0451\u0440\u0436\u0435 \u0438 \u0440\u0435\u0448\u0438\u043c \u0438\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0435\u0442\u043a\u0438 (<code>cherry-pick<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c, \u043a\u0430\u043a \u0441\u0445\u043b\u043e\u043f\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e (<code>squash<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 (<code>reset<\/code>, <code>revert<\/code>).<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0440\u0430\u0437\u043c\u0438\u043d\u043a\u0443 \u0441 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u2014 \u0447\u0451\u0442\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041a\u0430\u043a \u0438 \u0442\u0435\u0445\u043d\u0438\u043a\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043e\u043d\u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0431\u043e\u043b\u044c\u044e IT-\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441.<\/p>\n<h3>\u041c\u043e\u0434\u0435\u043b\u0438 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 Git \u0434\u043e\u043b\u0436\u0435\u043d \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u0441 \u0438\u0441\u0442\u043e\u0440\u0438\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442\u044c \u043b\u044e\u0431\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u043a\u043e\u0434\u043e\u043c: \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c, \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u0435\u043f\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0438 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043b\u043e\u043c\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u0432 \u043a\u043e\u0434\u0435, \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 Git: \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0442\u043a\u0438, \u043a\u0430\u043a \u0438\u0445 \u0432\u043b\u0438\u0432\u0430\u0442\u044c, \u0432 \u043a\u0430\u043a\u043e\u0439 \u043e\u0447\u0435\u0440\u0451\u0434\u043d\u043e\u0441\u0442\u0438 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u042d\u0442\u0438 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00ab\u041c\u043e\u0434\u0435\u043b\u0438 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f\u00bb. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0440\u043e\u0439\u043a\u0443 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445: <strong>Trunk-Based Development<\/strong>, <strong>Feature\/Issue Branch Workflow<\/strong> \u0438 <strong>Gitflow<\/strong>.<\/p>\n<blockquote>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Git \u043f\u043e\u0434 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<\/blockquote>\n<h3>Trunk-Based Development<\/h3>\n<figure class=\"full-width\">\n<div><figcaption>Trunk-Based Development<\/figcaption><\/div>\n<\/figure>\n<p><strong>Trunk-Based Development<\/strong> \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c: \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0442\u0440\u0443\u0434\u044f\u0442\u0441\u044f \u043d\u0430\u0434 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u043e\u0439 (<code>trunk<\/code>, <code>main<\/code> \u0438\u043b\u0438 <code>master<\/code>) \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435, \u0430 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u044e\u0442 \u043c\u0430\u0441\u0442\u0435\u0440-\u0432\u0435\u0442\u043a\u0443 \u043a \u0441\u0435\u0431\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u0432\u043d\u043e\u0441\u044f\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0442\u043e\u043c \u0432\u043b\u0438\u0432\u0430\u044e\u0442 (\u00ab\u043c\u0451\u0440\u0436\u0430\u0442\u00bb) \u0438\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 <code>master<\/code>.<\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0434\u043d\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0451\u0440\u0436\u0435\u0439 \u0432 <code>master<\/code> \u2014 \u044d\u0442\u043e \u0438 \u043f\u043b\u044e\u0441, \u0438 \u043c\u0438\u043d\u0443\u0441 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u041a\u0441\u0442\u0430\u0442\u0438, \u043e \u043f\u043b\u044e\u0441\u0430\u0445 \u0438 \u043c\u0438\u043d\u0443\u0441\u0430\u0445.<\/p>\n<p>\u0417\u0430 \u0447\u0442\u043e \u043b\u044e\u0431\u044f\u0442 <strong>Trunk-Based Development<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u0411\u044b\u0441\u0442\u0440\u0430\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u043e\u0442 \u043a\u043e\u043b\u043b\u0435\u0433.<\/strong> \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u0437\u0430\u043f\u0443\u0448\u0438\u043b\u0438 \u0432 <code>master<\/code>, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u0448\u0451\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0438 \u0441\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0432\u0441\u0451 \u0441\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u043d\u0435\u0434\u0430\u0432\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u00ab\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u00bb <code>master<\/code> \u0438 \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u00ab\u0421\u0432\u043e\u044f \u0432\u0435\u0442\u043a\u0430\u00bb.<\/strong> \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430\u0434 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u043e\u0439, \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u043e\u043d\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043d\u0435\u0439 \u043a\u0430\u043a \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u043e\u0431\u0449\u0435\u043c\u0443 \u043a\u043e\u0434\u0443 \u0438 \u0441\u043b\u0435\u0434\u044f\u0442, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u043c\u0451\u0440\u0436\u0435\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u0431\u0438\u0432\u043a\u0430 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438.<\/strong> \u041f\u0443\u0448 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 <code>master<\/code>, \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u0447. \u0422\u0430\u043a\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043c\u0451\u0440\u0436\u0435\u0439.<\/strong> \u0411\u044b\u0432\u0430\u044e\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u043d\u0430\u0434 \u0432\u0435\u0442\u043a\u043e\u0439 \u0434\u0432\u0435 \u043d\u0435\u0434\u0435\u043b\u0438, \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u043c\u0451\u0440\u0436\u0438\u0442\u044c \u0432 <code>master<\/code> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <strong>Trunk-Based Development<\/strong> \u0435\u0441\u043b\u0438 \u0438 \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b, \u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438 \u043b\u0435\u0433\u043a\u043e \u0440\u0435\u0448\u0430\u0435\u043c\u044b\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430 \u0447\u0442\u043e \u0440\u0443\u0433\u0430\u044e\u0442 <strong>Trunk-Based Development<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u0420\u0430\u0437 \u2014 \u0438 \u0433\u043e\u0442\u043e\u0432\u043e.<\/strong> \u041c\u043e\u0436\u043d\u043e \u0432\u0441\u0451 \u0441\u043b\u043e\u043c\u0430\u0442\u044c \u043e\u0434\u043d\u0438\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043b\u043e\u0436\u043d\u044b\u0439<\/strong> <code>revert<\/code><strong>.<\/strong> \u0412 \u0434\u0435\u043d\u044c \u0434\u0435\u043b\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432, \u0438 \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043e\u043c, \u043e\u0442 HEAD \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <code>revert<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0443\u043b\u043b.<\/strong> \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u043a \u0441\u0435\u0431\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 <code>master<\/code>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u043c\u0451\u0440\u0436\u0430.<\/p>\n<\/li>\n<\/ul>\n<h3>Feature\/Issue Branch Workflow<\/h3>\n<figure class=\"full-width\">\n<div><figcaption><strong>Feature\/Issue Branch Workflow<\/strong><\/figcaption><\/div>\n<\/figure>\n<p><strong>Feature\/Issue Branch Workflow<\/strong> \u2014 \u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 Trunk-Based Development.<\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u0443\u044e \u0444\u0438\u0447\u0443 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0432\u043e\u044f \u0432\u0435\u0442\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0434\u0451\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430, \u0438 \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0432\u0435\u0442\u043a\u0430 \u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <code>master<\/code>.<\/p>\n<p>\u0417\u0430 \u0447\u0442\u043e \u043b\u044e\u0431\u044f\u0442 <strong>Feature\/Issue Branch Workflow<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c.<\/strong> \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0432\u0435\u0442\u043a\u0435 \u0438 \u043d\u0438 \u043e\u0442 \u043a\u043e\u0433\u043e \u043d\u0435 \u0436\u0434\u0451\u0442\u0435 \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0443\u043b\u043b\u0438\u0442\u044c \u0438\u0437 <code>master<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439<\/strong> <code>master<\/code><strong>.<\/strong> \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0443\u043b\u043b\u044f\u0442\u0441\u044f \u0432 <code>master<\/code>, \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0442\u0435\u0441\u0442\u044b, \u0438 \u043c\u0430\u0441\u0442\u0435\u0440 \u0432\u0441\u0435\u0433\u0434\u0430 \u0433\u043e\u0440\u0438\u0442 \u00ab\u0437\u0435\u043b\u0451\u043d\u044b\u043c\u00bb.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430 \u0447\u0442\u043e \u0440\u0443\u0433\u0430\u044e\u0442 <strong>Feature\/Issue Branch Workflow<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u0412\u043f\u0435\u0440\u0435\u0434\u0438 \u043f\u0430\u0440\u043e\u0432\u043e\u0437\u0430.<\/strong> \u0415\u0441\u043b\u0438 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u0440\u0435\u0448\u0438\u043b \u0432\u043c\u0451\u0440\u0436\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432 <code>master<\/code> \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043c\u0451\u0440\u0436 \u0432\u044b, \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0441\u0435\u0431\u0435 <code>master<\/code> \u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u043e \u0441\u043b\u043e\u043c\u0430\u043d\u043d\u044b\u043c\u0438 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0442\u043a\u0443 \u0432 <code>master<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/strong> \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0442\u043e\u043a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0441\u0442\u0438, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0441\u0442\u0435\u0440-\u0432\u0435\u0442\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<h2>Gitflow<\/h2>\n<figure class=\"full-width\">\n<div><figcaption>Gitflow<\/figcaption><\/div>\n<\/figure>\n<p><strong>Gitflow<\/strong> \u2014 \u0447\u0443\u0442\u044c \u043b\u0438 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f Gitflow \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u0435\u0442\u043a\u0438: <code>master<\/code> \u0438 <code>develop<\/code>. \u0412 \u0432\u0435\u0442\u043a\u0435 master \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u043e\u0442\u043e\u0432\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u0432 production (\u043f\u0440\u043e\u0434). \u0412 \u0432\u0435\u0442\u043a\u0435 <code>develop<\/code> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043e\u0434\u0430 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0449\u0451 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u044b \u0432 \u043f\u0440\u043e\u0434.<\/p>\n<p>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Gitflow: \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u043f\u0440\u0438\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0432\u0435\u0442\u043a\u0443 <code>develop<\/code>, \u0438 \u0432\u0441\u0435 \u0442\u0440\u0443\u0434\u044f\u0442\u0441\u044f \u0432 \u043d\u0435\u0439. \u041e\u0442 \u0432\u0435\u0442\u043a\u0438 <code>develop<\/code> \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0442\u0432\u043e\u0434\u044f\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0435\u0442\u043a\u0438 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u2014 \u043f\u043e \u0441\u0443\u0442\u0438 <strong>Feature\/Issue Branch Workflow<\/strong>, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 <code>develop<\/code>, \u0430 \u043d\u0435 <code>master<\/code>. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043a\u043e\u0434\u044f\u0442 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0432\u0435\u0442\u043a\u0430\u0445, \u0430 \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 <code>develop<\/code>. \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u043f\u0440\u0438\u043d\u0442\u0430 \u043e\u0442 \u0432\u0435\u0442\u043a\u0438 <code>develop<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f release-\u0432\u0435\u0442\u043a\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u0435 \u043a \u043f\u0440\u043e\u0434\u043e\u0432\u043e\u0439 \u0441\u0440\u0435\u0434\u0435.<\/p>\n<blockquote>\n<p>Hotfix-\u0432\u0435\u0442\u043a\u0438 \u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 <code>release<\/code>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u043e\u0432\u044b\u0435 feature-\u0432\u0435\u0442\u043a\u0438 \u0432 \u0440\u0435\u043b\u0438\u0437 \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442.  <\/p>\n<\/blockquote>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u043f\u043e\u0447\u0438\u043d\u0438\u043b\u0438, \u0432\u043b\u0438\u043b\u0438 \u0444\u0438\u0447\u0438 \u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u043b\u0438\u0437, \u0432\u0435\u0442\u043a\u0430 <code>release<\/code> \u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <code>master<\/code> \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 <code>develop<\/code>, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0433\u043e\u0432 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u0435\u043b\u0438\u0441\u044c \u043e\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0417\u0430 \u0447\u0442\u043e \u043b\u044e\u0431\u044f\u0442 <strong>Gitflow<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/strong> \u041c\u043e\u0434\u0435\u043b\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u043e\u043b\u044c\u0448\u0438\u0445, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<\/li>\n<li>\n<p>\u00ab<strong>\u0412\u044b\u0431\u043e\u0440 \u0434\u0436\u0443\u043d\u0430<\/strong>\u00bb<strong>.<\/strong> Gitflow \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0430 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 junior-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0434\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0440\u0435\u043b\u0438\u0437.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430 \u0447\u0442\u043e \u0440\u0443\u0433\u0430\u044e\u0442 <strong>Gitflow<\/strong>:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c.<\/strong> \u041c\u043e\u0434\u0435\u043b\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 MVP, \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 GitHub \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u0430 \u043d\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u044e \u00ab\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0451\u0440\u0436 \u0432 \u043c\u0430\u0441\u0442\u0435\u0440 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c\u0438\u00bb. \u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 (\u0438\u043b\u0438 \u043d\u0435\u0442) \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<hr\/>\n<h3>Merge \u0438 rebase<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043e\u0442\u0432\u0435\u043b\u0438 \u0441\u0432\u043e\u044e \u0432\u0435\u0442\u043a\u0443 \u043e\u0442 <code>main<\/code>. \u0412\u043d\u043e\u0441\u0438\u043c \u0432 \u043d\u0435\u0451 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u043c\u043c\u0438\u0442\u0438\u043c \u0438 \u0443\u0436\u0435 \u0445\u043e\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0451\u0440\u0436 \u0432 <code>main<\/code>, \u043a\u0430\u043a\u2026 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432\u043d\u043e\u0441\u044f\u0442 \u0441\u0432\u043e\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0430\u0441.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0430\u043f\u0441\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0430\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 main-\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 \u0441\u0432\u043e\u044e \u0432\u0435\u0442\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>git merge<\/code> \u0438\u043b\u0438 <code>git rebase<\/code>:<\/p>\n<ul>\n<li>\n<p><code>git merge<\/code> \u2014 \u043f\u043e\u043c\u0451\u0440\u0436\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0435\u0442\u043a\u0438, \u0441\u043e\u0437\u0434\u0430\u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 merge-\u043a\u043e\u043c\u043c\u0438\u0442.<\/p>\n<\/li>\n<li>\n<p><code>git rebase<\/code> \u2014 \u0437\u0430\u043d\u043e\u0432\u043e \u043d\u0430\u043b\u043e\u0436\u0438\u0442 \u043d\u0430\u0448\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u043f\u043e\u0432\u0435\u0440\u0445 \u0442\u043e\u0439 \u0432\u0435\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c \u0432 \u0441\u0432\u043e\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 merge \u0438 rebase \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0435\u0442\u043a\u0438 main \u0438 merge \u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043b\u043e\u0433.<\/p>\n<pre><code>$ git log --all --graph --oneline:<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432\u0435\u0442\u043a\u0430 <code>merge<\/code> \u043e\u0442\u0432\u0435\u0434\u0435\u043d\u0430 \u043e\u0442 <code>main<\/code>, \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0430\u0441\u044c, \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u043a\u0430\u043a \u0432 <code>main<\/code>, \u0442\u0430\u043a \u0438 \u0432 <code>merge<\/code>.<\/p>\n<p>\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 <code>main<\/code> \u0432 \u0432\u0435\u0442\u043a\u0443 <code>merge<\/code>.<\/p>\n<h2>Merge  <\/h2>\n<p>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0432\u0435\u0442\u043a\u0443 merge: <\/p>\n<pre><code>$ git checkout merge<\/code><\/pre>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u0432\u0435\u0442\u043a\u0443 <code>main<\/code> (\u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u0431\u044b\u043b\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u0435\u0442\u043a\u0438):<\/p>\n<pre><code class=\"bash\">$ git fetch origin main                                                                           \ue0b2 \u2714 \ue0b3 4 \u2699 \ue0b2 6421 \ue0b2 11:08:28 From github.com:ifireice\/git  * branch            main       -> FETCH_HEAD<\/code><\/pre>\n<p>\u041c\u0451\u0440\u0436\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 <code>main<\/code> \u0432 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0432\u0435\u0442\u043a\u0443.<\/p>\n<pre><code class=\"bash\">$ git merge main Merge branch 'main' into merge # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.  Merge made by the 'recursive' strategy.  README.md | 9 ---------  1 file changed, 9 deletions(-)<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u0433 <code>$ git log --all --graph --oneline<\/code>:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c \u043f\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438, \u0447\u0442\u043e \u0434\u0432\u0435 \u0432\u0435\u0442\u043a\u0438 \u0441\u043c\u0451\u0440\u0436\u0435\u043d\u044b \u0432 <code>merge<\/code> \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 merge-\u043a\u043e\u043c\u043c\u0438\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0445 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b.<\/p>\n<h3>Rebase<\/h3>\n<p>\u041f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <code>main<\/code>:<\/p>\n<pre><code class=\"bash\">$ git fetch origin main                                                                           \ue0b2 \u2714 \ue0b3 4 \u2699 \ue0b2 6421 \ue0b2 11:08:28 From github.com:ifireice\/git  * branch            main       -> FETCH_HEAD<\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c <code>rebase<\/code>:<\/p>\n<pre><code class=\"bash\">$ git rebase main Successfully rebased and updated refs\/heads\/merge.<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u0433 <code>$ git log --all --graph --oneline<\/code>:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u043f\u043e\u0432\u0435\u0440\u0445 \u0432\u0435\u0442\u043a\u0438 <code>main<\/code> \u0437\u0430\u043d\u043e\u0432\u043e \u2014 \u0431\u0443\u0434\u0442\u043e \u043c\u044b \u043e\u0442\u0432\u0435\u043b\u0438 \u0432\u0435\u0442\u043a\u0443 <code>merge<\/code> \u043e\u0442 <code>main<\/code> \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e.<\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e merge-\u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u043d\u0435\u0442.<\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e <code>git rebase<\/code> \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0438 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c <code>git push force<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>rebase<\/code> \u043d\u0430 \u0432\u0435\u0442\u043a\u0430\u0445, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0442\u043e, \u0447\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0430\u0441\u0435\u043d <code>rebase<\/code>, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043d\u0438\u0436\u0435.<\/p>\n<h3>\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432<\/h3>\n<p>\u041f\u0440\u0438 \u043c\u0451\u0440\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0432\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e.<\/p>\n<p>\u041d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u043b\u0438 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432\u0430\u0442\u044c. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 GitHub \u0441\u043e\u043e\u0431\u0449\u0438\u0442 \u043e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0435:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041d\u0435\u0433\u043e\u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0451\u0440\u0436, \u043f\u043e\u043a\u0430 \u0431\u043e\u0434\u0440\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b\u00a0<\/figcaption><\/div>\n<\/figure>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442.<\/p>\n<h4>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430<\/h4>\n<ol>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a A, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0443:<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><\/figure>\n<ol start=\"2\">\n<li>\n<p>\u0412 \u044d\u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a B \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435 \u0432\u043d\u0451\u0441 \u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0438\u043b \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u043e\u0439:  <\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0432\u043b\u0438\u0442\u044c \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 <code>main<\/code> \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Git \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0441\u0430\u043c, \u2014 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435. \u042d\u0442\u0438\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>$ git log --all --graph<\/code> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418\u0449\u0435\u043c \u0441\u0432\u043e\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u044b<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0451\u0440\u0436\u0438\u0442\u044c \u0432\u0435\u0442\u043a\u0443 <code>main<\/code> \u0432 \u043d\u0430\u0448\u0443 \u0432\u0435\u0442\u043a\u0443 <code>feature-b<\/code>, \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442 \u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0441\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0438 \u043d\u0430\u0448\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0432\u0435\u0442\u043a\u0430 \u2014 <code>feature-b<\/code>.<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c <code>$ git checkout feature-b<\/code>.<\/p>\n<blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0434\u0430\u0451\u0442\u0435\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043f\u0430\u0443\u0437\u0443 \u0438 \u043f\u0440\u043e\u0447\u0442\u0438\u0442\u0435 <a href=\"https:\/\/habr.com\/ru\/companies\/yandex_praktikum\/articles\/700708\/\">\u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438<\/a>. \u0418\u043d\u0430\u0447\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0441\u0442\u0430\u043d\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u2014 \u043d\u0435\u0442.<\/p>\n<\/blockquote>\n<p>\u041c\u0451\u0440\u0436\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 \u0432\u0435\u0442\u043a\u0438 <code>main<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>$ git merge main<\/code>:<\/p>\n<pre><code class=\"bash\">$ git merge main Auto-merging README.md CONFLICT (content): Merge conflict in README.md Automatic merge failed; fix conflicts and then commit the result.<\/code><\/pre>\n<p>Git \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043f\u043e\u043c\u0451\u0440\u0436\u0438\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0438<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-412231","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/412231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=412231"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/412231\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=412231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=412231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=412231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}