background preloader

Git Workflows and Tutorials

Git Workflows and Tutorials
The array of possible workflows can make it hard to know where to begin when implementing Git in the workplace. This page provides a starting point by surveying the most common Git workflows for enterprise teams. As you read through, remember that these workflows are designed to be guidelines rather than concrete rules. We want to show you what’s possible, so you can mix and match aspects from different workflows to suit your individual needs. Centralized Workflow Transitioning to a distributed version control system may seem like a daunting task, but you don’t have to change your existing workflow to take advantage of Git. However, using Git to power your development workflow presents a few advantages over SVN. Second, it gives you access to Git’s robust branching and merging model. How It Works Like Subversion, the Centralized Workflow uses a central repository to serve as the single point-of-entry for all changes to the project. Developers start by cloning the central repository.

Related:  GitHubgitgitContinuous IntegrationSource Control

Getting started with Git In the introduction to this series we learned who should use Git, and what it is for. Today we will learn how to clone public Git repositories, and how to extract individual files without cloning the whole works. Since Git is so popular, it makes life a lot easier if you're at least familiar with it at a basic level. If you can grasp the basics (and you can, I promise!)

Version Control Best Practices Commit Related Changes A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. What is Your Branching Model? Note: At no point are we asking about local branching (on your local workstation with Git, etc). This is all about branching on the remote repository. That is if your company has one, and isn’t completely distributed, with no central repo. Teams develop on their own branches, and release from them. The then merge back to ‘mainline’ after the release. Many developers co-exist on one branch that can last for months, and that’s how major projects are separated.

Continuous Integration for Pull Requests with Jenkins and Bitbucket Server (Stash) Continuous integration and pull requests are two important concepts for almost any development team. Besides many other benefits, ensuring code stability and quality, ease of collaboration with other developers and fast release cycles are some of the key aspects. This post describes a solution to combine and Jenkins for automated builds of pull requests and reporting back the status to Stash. Thereby we build not the last commit of the pull request but merge the pull request automatically into the target branch. Understanding the GitHub Flow · GitHub Guides GitHub Flow is a lightweight, branch-based workflow that supports teams and projects where deployments are made regularly. This guide explains how and why GitHub Flow works. Create a branch

git: fetch and merge, don’t pull This is too long and rambling, but to steal a joke from Mark Twain Blaise Pascal I haven’t had time to make it shorter yet. There is some discussion of this post on the git mailing list, but much of it is tangential to the points I’m trying to make here. One of the git tips that I find myself frequently passing on to people is: Don’t use git pull, use git fetch and then git merge. The problem with git pull is that it has all kinds of helpful magic that means you don’t really have to learn about the different types of branch in git. Mostly things Just Work, but when they don’t it’s often difficult to work out why. GitFlow considered harmful GitFlow is probably the most popular Git branching model in use today. It seems to be everywhere. It certainly is everywhere for me personally - practically every project at my current job uses it, and often it's the clients themselves who have chosen it.

Roger Ignazio Waylon is a dashboard to display the status of your Jenkins builds. Overview Displays individual jobs, or all of the jobs in a view (or nested view) for one or more Jenkins instances Displays build stability for each job (sunny, cloudy, raining) Groups jobs by building, failed, and successful, and displays job counts for each Mark a failed build as ‘under investigation’ (requires the description-setter plugin) Multiple views allows for multiple teams to utilize a single Waylon install Nirvana mode displays a calming image of Oregon if all your jobs are green Trouble mode displays an image of a forest fire if more than trouble_threshold jobs are red (default is disabled)

KB Article: Useful Queries for TRACK2SQL There are several ways to track various server problems using TRACK2SQL, and this article discusses some of the most common queries you might use. Times returned by these queries are in milliseconds. Process IO Consumption The following SQL statement returns user, command and "IO used", to show which processes consumed the most IO. Basic Branching and Merging Let’s go through a simple example of branching and merging with a workflow that you might use in the real world. You’ll follow these steps: Do work on a web site.Create a branch for a new story you’re working on.Do some work in that branch. At this stage, you’ll receive a call that another issue is critical and you need a hotfix. You’ll do the following: Switch to your production branch.Create a branch to add the hotfix.After it’s tested, merge the hotfix branch, and push to production.Switch back to your original story and continue working.

About Version Control This chapter will be about getting started with Git. We will begin by explaining some background on version control tools, then move on to how to get Git running on your system and finally how to get it set up to start working with. At the end of this chapter you should understand why Git is around, why you should use it and you should be all set up to do so. What is "version control", and why should you care? Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. For the examples in this book you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer.

Follow-up to 'GitFlow considered harmful' My previous post, in which I explained what I disliked about GitFlow, generated a lot of feedback on /r/programming, HackerNews, Twitter and in the comments section of the article itself. I like to thank everybody who took the time to read the post and maybe write a response - it's been great knowing that a lot of you have had similar experiences to mine, and even better finding out that for some people, those things that bug me are not a problem at all (I devote a whole section to that issue below). While reading and responding to the comments, there were a few cases where the same issues would keep popping up again and again, which indicates to me that I did not make myself clear enough in a couple of places. In this post, I attempt to clarify those recurring issues. "I agree with the article, but we have to keep using GitFlow because your workflow can't do X" The workflow I described can do everything that GitFlow can.

Continuous Integration in the Cloud: Comparing Travis, Circle and Codeship Continuous Integration (CI) is an essential part to any modern development process. Gone are the days of monolithic releases with massive changes, today it’s all about releasing fast and often. Most teams have come to rely on some sort of automated CI system. In this article we are going to talk about some of the benefits of CI and how it fits into small, medium and large projects followed by a quick overview of three different hosted CI services and how they apply to projects of various sizes. Continuous Integration Wikipedia defines Continuous Integration as