{"id":770,"date":"2017-11-02T10:34:15","date_gmt":"2017-11-02T10:34:15","guid":{"rendered":"https:\/\/www.remotedevelopment.co.uk\/cms\/?p=770"},"modified":"2017-11-02T10:34:15","modified_gmt":"2017-11-02T10:34:15","slug":"git-workflows","status":"publish","type":"post","link":"https:\/\/www.remotedevelopment.co.uk\/cms\/git-workflows\/","title":{"rendered":"Git workflows"},"content":{"rendered":"<p>Confused about how to work with Git?  You soon will not be confused, it is a well designed and versatile essential tool for remote development.<\/p>\n<p><a href=\"https:\/\/www.atlassian.com\/git\/tutorials\/comparing-workflows?utm_source=newsletter&#038;utm_medium=email&#038;utm_campaign=bitbucket_product-digest-nine&#038;jobid=102814462&#038;subid=1069000195\" rel=\"noopener\" target=\"_blank\">1. Comparing workflows<\/a><\/p>\n<p><a href=\"http:\/\/nvie.com\/posts\/a-successful-git-branching-model\/\" rel=\"noopener\" target=\"_blank\">2. Gitflow architecture<\/a> (also covered in article 1.)<\/p>\n<p>Remote Development uses the Gitflow branching model. Simply put:<\/p>\n<blockquote><p>0. Initial steps<br \/>\n<code>git init<br \/>\ngit remote add origin git@softwareantelope.com\/project-repo.git<br \/>\ngit fetch<\/code><\/p>\n<p>1. Developer checks out Master branch<br \/>\n<code>git checkout master<\/code><\/p>\n<p>2. Developer checks out a new feature branch<br \/>\n<code>git checkout -b feature\/my-new-feature<\/code><\/p>\n<p>3. Developer work on and commits to feature branch<\/p>\n<p>4. Developer pushes the feature branch to origin<\/p>\n<p>First time:<br \/>\n<code>git push -u origin feature\/my-new-feature<\/code><\/p>\n<p>Subsequently:<br \/>\n<code>git push<\/code><\/p>\n<p>5. Developer issues a pull request for the feature branch into Master<\/p><\/blockquote>\n<p>Simple?<\/p>\n<p>The admin maintains the git repository, and collects ssh-keys (public) from each developer so that they can login to git@softwareantelope.com without a password.<\/p>\n<p>The git admin checks the new feature branch, and notes any migrations that are required.  When the PR is approved it is merged into the staging branch.  Developers can now check their branches have been correctly merged into the staging branch and flags the branch as releasable if it does not cause issues.<\/p>\n<p>At the end of the sprint, the admin builds a new server instance for live and switches to it after applying any updates.  The staging branch is now merged with the Master branch.  Developers can continue to work in their feature branches by merging master  into their branch on the new sprint.<\/p>\n<p>ANY FAILURE along the way is immediately notified to the admin so it can be fixed before it becomes a major exercise.  Remember keep your branch atomic and up to date with the latest master.<\/p>\n<p><strong>Conflicts<\/strong><\/p>\n<p>Provided that developers work on separate concerns conflicts are kept to a minimum.  Conflicts are resolved by the Admin using the simple &#8220;important branches first&#8221; principle.  <\/p>\n<p><strong>Solo Developers<\/strong><\/p>\n<p>These rules apply to teams.  They are also adhered to for developers who are single-handed on a project.  It allows control, accountability, backup and many other advantages.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Confused about how to work with Git? You soon will not be confused, it is a well designed and versatile essential tool for remote development. 1. Comparing workflows 2. Gitflow architecture (also covered in article 1.) Remote Development uses the Gitflow branching model. Simply put: 0. Initial steps git init git remote add origin git@softwareantelope.com\/project-repo.git &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.remotedevelopment.co.uk\/cms\/git-workflows\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Git workflows&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[13],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8yghz-cq","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1008,"url":"https:\/\/www.remotedevelopment.co.uk\/cms\/laravel\/","url_meta":{"origin":770,"position":0},"title":"Laravel","author":"Nicholas","date":"August 4, 2018","format":false,"excerpt":"Lovely to work with, clean and fast.\u00a0 Laravel is one of the most popular PHP frameworks for MVC system development. Developers are encouraged to stay fully up to date with Laravel and pounce on work opportunities.\u00a0 With Remote Development, we can provide what you need right now, a server, bandwidth\u2026","rel":"","context":"In &quot;Tech Guides&quot;","block_context":{"text":"Tech Guides","link":"https:\/\/www.remotedevelopment.co.uk\/cms\/category\/technical\/tech-guides\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1060,"url":"https:\/\/www.remotedevelopment.co.uk\/cms\/developers-2\/","url_meta":{"origin":770,"position":1},"title":"Developers","author":"Nicholas","date":"April 13, 2019","format":false,"excerpt":"we = remotedevelopment team, you=a developer Onboarding Initial contact from linked in, link to our website, email or other sources. You get to the website and fill in a form Personal details (name, age, nationality, company\/sole trader)Payment details (paypal, stripe, bank account number)Skills and experience matrixCV upload (PDF for direct\u2026","rel":"","context":"In &quot;Admin&quot;","block_context":{"text":"Admin","link":"https:\/\/www.remotedevelopment.co.uk\/cms\/category\/admin\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1140,"url":"https:\/\/www.remotedevelopment.co.uk\/cms\/2020-planning\/","url_meta":{"origin":770,"position":2},"title":"2020 Planning","author":"Nicholas","date":"January 4, 2020","format":false,"excerpt":"Remote Development has been successfully providing one developer with remote work but on contract while making contact with other capable developers. It is however not yet operating, it is in development as an online project. Our other principal remote developer has written a developer onboarding and sprint management system in\u2026","rel":"","context":"In &quot;Admin&quot;","block_context":{"text":"Admin","link":"https:\/\/www.remotedevelopment.co.uk\/cms\/category\/admin\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":294,"url":"https:\/\/www.remotedevelopment.co.uk\/cms\/remote-development-websites\/","url_meta":{"origin":770,"position":3},"title":"Remote Development Websites","author":"Nicholas Alexander","date":"August 21, 2017","format":false,"excerpt":"Remote Development is a \"hybrid\" site: this site is a CMS, we also have a web app written in Laravel which is an ongoing agile project, our live site. This website www.remotedevelopment.co.uk is our marketing and information site, if you want to contribute to it, please email info@remotedevelopment.co.uk. Our live\u2026","rel":"","context":"In &quot;Article&quot;","block_context":{"text":"Article","link":"https:\/\/www.remotedevelopment.co.uk\/cms\/category\/article\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":972,"url":"https:\/\/www.remotedevelopment.co.uk\/cms\/keeping-wordpress-up-to-date\/","url_meta":{"origin":770,"position":4},"title":"Keeping WordPress up to date","author":"Nicholas","date":"August 4, 2018","format":false,"excerpt":"Remote Developers who support clients using Wordpress must consider some very simple rules.\u00a0 Our hosted services support observation of these rules so that end clients, editors, authors and contributors have the simplest and richest, most secure and successful experience of using a great product which has become the industry standard\u2026","rel":"","context":"In &quot;Archived&quot;","block_context":{"text":"Archived","link":"https:\/\/www.remotedevelopment.co.uk\/cms\/category\/archived\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.remotedevelopment.co.uk\/cms\/wp-content\/uploads\/2018\/08\/2012-06-07-15.12.30.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":381,"url":"https:\/\/www.remotedevelopment.co.uk\/cms\/a-new-developer\/","url_meta":{"origin":770,"position":5},"title":"A new Developer","author":"Nicholas Alexander","date":"August 22, 2017","format":false,"excerpt":"Initialisation When a new developer joins our team, these steps must be completed. 1. The developer must fill in their basic profile and upload their CV as a PDF. 2. Create full.name@remotedevelopment.co.uk and forward it to their email address. 3. Invite to Slack and welcome them with a conversation. 4.\u2026","rel":"","context":"In &quot;technical&quot;","block_context":{"text":"technical","link":"https:\/\/www.remotedevelopment.co.uk\/cms\/category\/technical\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.remotedevelopment.co.uk\/cms\/wp-json\/wp\/v2\/posts\/770"}],"collection":[{"href":"https:\/\/www.remotedevelopment.co.uk\/cms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.remotedevelopment.co.uk\/cms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.remotedevelopment.co.uk\/cms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.remotedevelopment.co.uk\/cms\/wp-json\/wp\/v2\/comments?post=770"}],"version-history":[{"count":1,"href":"https:\/\/www.remotedevelopment.co.uk\/cms\/wp-json\/wp\/v2\/posts\/770\/revisions"}],"predecessor-version":[{"id":771,"href":"https:\/\/www.remotedevelopment.co.uk\/cms\/wp-json\/wp\/v2\/posts\/770\/revisions\/771"}],"wp:attachment":[{"href":"https:\/\/www.remotedevelopment.co.uk\/cms\/wp-json\/wp\/v2\/media?parent=770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.remotedevelopment.co.uk\/cms\/wp-json\/wp\/v2\/categories?post=770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.remotedevelopment.co.uk\/cms\/wp-json\/wp\/v2\/tags?post=770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}