Skip to content

Instantly share code, notes, and snippets.

@realshovanshah
Last active November 11, 2021 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save realshovanshah/997f46324190370e85598af6782adf38 to your computer and use it in GitHub Desktop.
Save realshovanshah/997f46324190370e85598af6782adf38 to your computer and use it in GitHub Desktop.
branching

Main branches

At the core, the development model is greatly inspired by existing models out there, especially gitflow. The central repo holds two main branches with an infinite lifetime with develop being the default branch:

  • master - Always reflects a production-ready state.

  • develop- Always reflects a state with the latest delivered development changes for the next release.

When the source code in the develop branch reaches a stable point and is ready to be released, all of the changes should be merged back into master and then tagged with a release number.

Supporting branches

Our development model uses a variety of supporting branches to aid parallel development between team members, ease tracking of features, prepare for production releases and to assist in quickly fixing live production problems. These branches should be short lived to ensure the best development experience.

The different types of branches we may use are:

  • Feature branches
  • Bugfix branches
  • Hotfix branches

FEATURES:

Use to develop new features starting from the develop branch. Merge back into develop branch waiting for a reasonable amount of features to be there before declaring it a release.

Create Branch:
$ git checkout -b feature/my-feat develop

Merge Changes:
$ git checkout develop
$ git merge --no-ff feature/my-feat
$ git branch -d feature/my-feat
$ git push origin develop

BUGFIXES:

Use to work on bugfixes starting from the develop branch. Merge back into develop branch waiting for a reasonable amount of bugs to be there before declaring it a minor release.

Create branch:
$ git checkout -b bugfix/my-issue develop

Merge Changes:
$ git checkout develop
$ git merge --no-ff bugfix/my-issue
$ git branch -d bugfix/my-issue
$ git push origin develop

HOTFIXES:

The hotfix branch starts off master to avoid involuntary send to production of unwanted features that my be present in branches. The hotfix must be used when an important bug arises in production which must be fixed and can't wait for other features to be ready. It merges back to master and develop.

Create Branch:
$ git checkout -b hotfix/1.2.1 master
$ ./bump-version.sh 1.2.1
$ git commit -a -m "Bumped version number to 1.2.1"

Merge Changes:
$ git checkout master
$ git merge --no-ff release-1.2
$ git tag -a 1.2

Also:
$ git checkout develop
$ git merge --no-ff hotfix-1.2.1

####Ideal Commit Tree:

fig: Git Flow Commit Tree

Enter a location: himalayan java (ChIJHWe64-cZ6zkRHePB8QIB3Lc, ChIJwYsJWyoFkFQRpwLfzJYu64c, ChIJrVTkhgIZ6zkR5cK6MG0UArA, ChIJ9WhxxcoZ6zkRV6QgxfIiuLU, ChIJezvY_DQX6zkRKnK59GvTLtI) { "html_attributions" : [], "result" : { "address_components" : [ { "long_name" : "Jhamsikhel Marg", "short_name" : "Jhamsikhel Marg", "types" : [ "route" ] }, { "long_name" : "Sanepa", "short_name" : "Sanepa", "types" : [ "sublocality_level_1", "sublocality", "political" ] }, { "long_name" : "Lalitpur", "short_name" : "Lalitpur", "types" : [ "locality", "political" ] }, { "long_name" : "Lalitpur", "short_name" : "Lalitpur", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Bagmati Province", "short_name" : "Bagmati Province", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "Nepal", "short_name" : "NP", "types" : [ "country", "political" ] }, { "long_name" : "44600", "short_name" : "44600", "types" : [ "postal_code" ] } ], "adr_address" : "\u003cspan class="street-address"\u003eJhamsikhel Marg\u003c/span\u003e, \u003cspan class="locality"\u003eLalitpur\u003c/span\u003e \u003cspan class="postal-code"\u003e44600\u003c/span\u003e, \u003cspan class="country-name"\u003eNepal\u003c/span\u003e", "business_status" : "OPERATIONAL", "formatted_address" : "Jhamsikhel Marg, Lalitpur 44600, Nepal", "formatted_phone_number" : "01-5545901", "geometry" : { "location" : { "lat" : 27.6789617, "lng" : 85.3098686 }, "viewport" : { "northeast" : { "lat" : 27.6803208302915, "lng" : 85.3111889802915 }, "southwest" : { "lat" : 27.67762286970849, "lng" : 85.3084910197085 } } }, "icon" : "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/cafe-71.png", "icon_background_color" : "#FF9E67", "icon_mask_base_uri" : "https://maps.gstatic.com/mapfiles/place_api/icons/v2/cafe_pinlet", "international_phone_number" : "+977 1-5545901", "name" : "Himalayan Java - Jhamsikhel", "opening_hours" : { "open_now" : true, "periods" : [ { "close" : { "day" : 0, "time" : "2100" }, "open" : { "day" : 0, "time" : "0600" } }, { "close" : { "day" : 1, "time" : "2100" }, "open" : { "day" : 1, "time" : "0600" } }, { "close" : { "day" : 2, "time" : "2100" }, "open" : { "day" : 2, "time" : "0600" } }, { "close" : { "day" : 3, "time" : "2100" }, "open" : { "day" : 3, "time" : "0600" } }, { "close" : { "day" : 4, "time" : "2100" }, "open" : { "day" : 4, "time" : "0600" } }, { "close" : { "day" : 5, "time" : "2100" }, "open" : { "day" : 5, "time" : "0600" } }, { "close" : { "day" : 6, "time" : "2100" }, "open" : { "day" : 6, "time" : "0600" } } ], "weekday_text" : [ "Monday: 6:00 AM – 9:00 PM", "Tuesday: 6:00 AM – 9:00 PM", "Wednesday: 6:00 AM – 9:00 PM", "Thursday: 6:00 AM – 9:00 PM", "Friday: 6:00 AM – 9:00 PM", "Saturday: 6:00 AM – 9:00 PM", "Sunday: 6:00 AM – 9:00 PM" ] }, "photos" : [ { "height" : 3024, "html_attributions" : [ "\u003ca href="https://maps.google.com/maps/contrib/106054869305142744230"\u003eJenae Lien\u003c/a\u003e" ], "photo_reference" : "Aap_uECnVUdj6NXMGNqvt6YwLNKo4QMc7CC4q18rmHI-6BA2d_n4_TOFROv5ap77m90XNz8tfppLnTLS4246xqdboHp3lYmZE3Fw9hGx91VFKZbU5B9pUEU3NjVcqGKwaKkMjz5ER8RhSW0aK8xItwabo_TkH7pFeaxGvp9XHVcbH5nwpdiX", "width" : 4032 }, { "height" : 3024, "html_attributions" : [ "\u003ca href="https://maps.google.com/maps/contrib/109471533805786707277"\u003e ちゃちゃろぐネパール情報ブログ\u003c/a\u003e" ], "photo_reference" : "Aap_uEAVtzfxJ9PssPt70OlaAYsJSnT-dK0NIMsoJiReXD--LuISwhkK8xzHKAsK5joN-XTOYOpX4t2v4Fz3WAxyOdWcoYi196QeunCp-LEY0DfLpmop4ppevhLTdYTNpAlsdmrGuFCuUm738E8ORw8ryrNZH-ggkXtYpDp4qCzwcKwYpoyA", "width" : 4032 }, { "height" : 3000, "html_attributions" : [ "\u003ca href="https://maps.google.com/maps/contrib/110376926197356458976"\u003eSusan Thapa Magar\u003c/a\u003e" ], "photo_reference" : "Aap_uED9LBbaCG7upQ8yjUSkzc6ohHtOnF4bZhZ5TIUI7zEAvIXInCkeXknw3Twv2umdrrhl2LLD9Oix-B_TYkg8JI3PWgpDAKLk9suoY-XKip7hxBAYktygvCAit23vdDBlDEcnGkUEgxu3f-SRdwGOLit7w9K3beiUtJDwan-5C0WbkBV9", "width" : 4000 }, { "height" : 4032, "html_attributions" : [ "\u003ca href="https://maps.google.com/maps/contrib/113820583313538021837"\u003eSony Rauniyar\u003c/a\u003e" ], "photo_reference" : "Aap_uEDEH6GvVdioZpRN-cXvUCyb4peEu90RLEP9fa3ed_khJaIK2zVYaMWCKBLAAYHHHsgqciCUZjBT2-X56KMAAedzGtQIA8yd_uYuP_VWg17Hjb-9G-x3FxOoMIsFg5Dw4ep5wXMKGWrZaFZQwJGcGkA_5EIjCmVsxThjGdFLYNYEep35", "width" : 3024 }, { "height" : 4000, "html_attributions" : [ "\u003ca href="https://maps.google.com/maps/contrib/100238684907562578059"\u003eKiran G.C.\u003c/a\u003e" ], "photo_reference" : "Aap_uEAfkGXEGmnkTfhXdORI-vSKucdXKx48tbJVyUPIrTiL81PqpCEsC-vbMGc1R0kN0MKyZmxyvNiGYqYRETKtyUGwC_lOmDq1Fu10bcOL2vf7hr1TYTY4n6HuIYDOKY5etWURFiGzI0qxigVvVEl1KY5U_SXYZuoWIxzH2kyi2N1Zd40u", "width" : 3000 }, { "height" : 3000, "html_attributions" : [ "\u003ca href="https://maps.google.com/maps/contrib/118084992188561838559"\u003eMiraz\u003c/a\u003e" ], "photo_reference" : "Aap_uEDhwS2yjMQySovUM6a_SvJcihvf3rLOqgY8UEXDI_Qe_OQM0Oc4qAFB4Jg9xD5ggyzuxnL2Fsd2OoC_QN2GHAUNw2Aonj8-751wRAjVHf4lPi64Wvo7pfYs6fNZt2Nh8VD5-bXuDHG0wyRJjqwFmEHiYU1M1kq1dVG8b2a8X4Hs8QX-", "width" : 4000 }, { "height" : 3024, "html_attributions" : [ "\u003ca href="https://maps.google.com/maps/contrib/102500364652897881408"\u003eKen Wong\u003c/a\u003e" ], "photo_reference" : "Aap_uEDv8N4VMkSTihV-NO5vwUFxqkBZEj3hb_X_8b0U66bKx6Ri__acyv0adtWJ_kPMDozRz8E3TfccvjcRpjqjC8EZQ8cBNHhwVo6pIPyGf2Hx7czR6j2F-wZ6qF7yijVgXGWDshz_JEYFQef5JmxvKBDaUIxDOjRyJOaxkE39iGttfTUt", "width" : 4032 }, { "height" : 4032, "html_attributions" : [ "\u003ca href="https://maps.google.com/maps/contrib/108782435370888535460"\u003eragini pandey\u003c/a\u003e" ], "photo_reference" : "Aap_uEC7HFEsmP_qwp706N6n-AvHVde1s9ms9Ywr69Uhc3GeHVY53Wx3MYueMbUnAimhlYVQRAGnw57i_IECEamGF6O5GSlWUzXFqEqJwwBAz6ndyn384ReEcf9LRc3FYM3KD2LA3XU8l5uDzbBGMNm71QK0vqyWrZj0TqE5IEpS4yaql_b0", "width" : 3024 }, { "height" : 4032, "html_attributions" : [ "\u003ca href="https://maps.google.com/maps/contrib/115165685750656298035"\u003eMadhu Parakh\u003c/a\u003e" ], "photo_reference" : "Aap_uEA1TZr8X2ws3F0tKze1fCh2xQdrfLifxj09iOfrMT1N0-9RG4RGkbk-ufeiOY3po9b38hdJFkKaxvfVXX1-DOwjoVluse9r9P0nz12RmyDQugLnnKmLJCufHsr-VkNdZ4a7dN9-cfULkgopODU7i28RO1BchE68Rzk0svuodzOd1VMd", "width" : 3024 }, { "height" : 4000, "html_attributions" : [ "\u003ca href="https://maps.google.com/maps/contrib/102475753366813112097"\u003eManish Amgain\u003c/a\u003e" ], "photo_reference" : "Aap_uEDn98x3lUyF8GsvVeX-zEtWo5bKDtdKHWocs-Y3bw9ZGoiWQcOHZe6Ah8Itly6pPyHlp_sJIAb-eNY4WUK8rxBt8Eg1YwBbY6XU6vEDflDcOdvY5656J6lZF7QgdSp8g3IIGTiSUVtUaRJ6cwIPx-S1rZ2gvBg_RW1ElLQVDPQOcO6Z", "width" : 3000 } ], "place_id" : "ChIJHWe64-cZ6zkRHePB8QIB3Lc", "plus_code" : { "compound_code" : "M8H5+HW Lalitpur, Nepal", "global_code" : "7MV7M8H5+HW" }, "price_level" : 2, "rating" : 4.4, "reference" : "ChIJHWe64-cZ6zkRHePB8QIB3Lc", "reviews" : [ { "author_name" : "Siddhi Kiran Bajracharya", "author_url" : "https://www.google.com/maps/contrib/101304743187757245893/reviews", "language" : "en", "profile_photo_url" : "https://lh3.googleusercontent.com/a-/AOh14GgS5q7ukd0Kc4v-hn7QBVjBcQu2pulEhEsRmb5sQi8=s128-c0x00000000-cc-rp-mo-ba4", "rating" : 4, "relative_time_description" : "3 months ago", "text" : "They not only serve good beverages. They also have a good breakfast and lunch menu. I had grilled sandwich with tomato, cheese and sweet pickle. They served a decent portion enough for two people if you are not that hungry.", "time" : 1626962109 }, { "author_name" : "Swarna Tamrakar", "author_url" : "https://www.google.com/maps/contrib/111193702682324154181/reviews", "language" : "en", "profile_photo_url" : "https://lh3.googleusercontent.com/a-/AOh14GiNQDrdgVnczUtYV5zOAZcInrv8pLRWzLWWQJsA2zk=s128-c0x00000000-cc-rp-mo", "rating" : 4, "relative_time_description" : "2 months ago", "text" : "I love to hang out here. Majorly because of the well behaved staffs.\nFood and beverage anywhere in Java is good :)", "time" : 1631080063 }, { "author_name" : "PRABHAT JOSHI", "author_url" : "https://www.google.com/maps/contrib/117157374004323891761/reviews", "language" : "en", "profile_photo_url" : "https://lh3.googleusercontent.com/a-/AOh14GjxGpoHzIqES1HdBAK19MgkRIw5JQ05Lo92a3rMhg=s128-c0x00000000-cc-rp-mo-ba3", "rating" : 2, "relative_time_description" : "2 months ago", "text" : "I used to love this place . But when i went there day before yesterday, i was quiet dissatisfied with the break fast. I wanted some freshly cooked hot break fast on a rainy day. But everything they served was cold and the worst part was, neither the bread was toasted and nor the omelette was hot . My recommendation is not to go there in early morning.", "time" : 1630297006 }, { "author_name" : "ragini pandey", "author_url" : "https://www.google.com/maps/contrib/108782435370888535460/reviews", "language" : "en", "profile_photo_url" : "https://lh3.googleusercontent.com/a-/AOh14GjM1KHWVYFZU4vzXCE5Xrs7QUKEU28u58kVzRyVHQ=s128-c0x00000000-cc-rp-mo-ba3", "rating" : 5, "relative_time_description" : "3 weeks ago", "text" : "A local brand of nepal and i must say a good one! We had a cappuccino and double expresso mocha. It was really good. I had an almond cookie as well which was again very good. A must go on lounge time.", "time" : 1634223308 }, { "author_name" : "Comfortably Numb", "author_url" : "https://www.google.com/maps/contrib/103944044892828633915/reviews", "language" : "en", "profile_photo_url" : "https://lh3.googleusercontent.com/a/AATXAJzZAfz2lnup-aXOqm-VJuSbKUjBCAQoRtyT-3nJ=s128-c0x00000000-cc-rp-mo-ba3", "rating" : 4, "relative_time_description" : "a month ago", "text" : "Great interior. Good ambience. Perfect place to have breakfast, cakes and coffee.", "time" : 1631976348 } ], "types" : [ "cafe", "food", "point_of_interest", "store", "establishment" ], "url" : "https://maps.google.com/?cid=13248465315974734621", "user_ratings_total" : 661, "utc_offset" : 345, "vicinity" : "Jhamsikhel Marg, Lalitpur", "website" : "http://www.himalayanjava.com/" }, "status" : "OK" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment