DevOps

Straight road ahead

Fixing our mental model of Git Branches; it’s a straight line folks!

Recall From the last part, we learnt that: git tracks your code with a pointer called HEAD When you commit, you create a snapshot of your code with a unique commit ID which is a long alphanumeric string. When you checkout a particular commit, you move the HEAD (git’s pointer) to that commit. You can move …

Fixing our mental model of Git Branches; it’s a straight line folks!Read More »

Branches

Digging Deep into Git with 1 file in a single repository and 11 commits

Recently, I was conducting a session on git and branching and I was trying to explain the mental model. I didn’t do a very good job of it. I found an excellent post by Neil Atkinson called Git branches – Is your mental model wrong?. I tried to use the post, but it didn’t help …

Digging Deep into Git with 1 file in a single repository and 11 commitsRead More »

Door with a sign that says "Restricted Area, Authorized persons only"

Adding Elegance & Security to Deployment

In the last part, we got a deployment strategy working by mapping our workflow to git branches and setting up a script for automatic deployment. At the end of it I mentioned that our script was not elegant since it would run with any push. It wouldn’t matter if code was pushed to the branch …

Adding Elegance & Security to DeploymentRead More »

PHP code on Laptop

Creating a simple deployment script with PHP

In earlier parts of this tutorial, we discussed the concepts and mental models associated with a deployment process using git. We also set up our servers and remote repositories. In this part, we create a PHP script that will be invoked when the remote git repository requests the Webhook URL. For this example, we’re going …

Creating a simple deployment script with PHPRead More »

Computer terminal

Digging into git commands for deployment

In the first part of this tutorial, we discussed a mental model of deployment stages mapped to git branches. We also discussed conceptually how running a git push origin branch-name to push code to the remote repository can trigger a webhook which we can use to pull code from the repository to a server using git pull origin branch-name. In the second …

Digging into git commands for deploymentRead More »

Woman holding out a key in her necklace

Setting up servers & repositories

In the last part, we created a client side workflow with separate stages mapped to specific branches: Git Branch Workflow Stage Server master 1. Development https://dev.yoursite.com/ staging 2. Staging https://staging.yoursite.com/ production 3. Live/ Production https://yoursite.com/ It doesn’t matter how many stages you have in your workflow as long as each stage is mapped to a …

Setting up servers & repositoriesRead More »

branch with flowers

Preparing a conceptual model for workflow using git branching

In this part, I’m going to explore the mental model for a deployment workflow by mapping it to git branches. Requirements Servers You’ll need at least one proper server. By proper, I mean a server where you can log in from the terminal and run commands. That requires ssh access. I find DigitalOcean (referral link) to …

Preparing a conceptual model for workflow using git branchingRead More »

%d bloggers like this: