background preloader

Nick Farina - Git Is Simpler Than You Think

Nick Farina - Git Is Simpler Than You Think
It was about one year ago that we switched to Git. Previously, we used Subversion, through the Mac app Versions, which (rightly) holds an Apple Design Award. I made the executive decision to leave our comfy world of Versions because it seemed clear that Git was winning the Internet. There was much grumbling from my teammates, who were busy enough doing actual work thank you very much. But I pressed forward. We signed up for accounts on Github. It might as well have printed PC LOAD LETTER. “Not currently on any branch?!” Maintenance Required Git is not a Prius. By now we all know how to drive Git. Did you know the top result for “git tutorial” is this manpage on kernel.org? So instead let’s pull over, open the hood up, and poke around. The Basics We’ll run through some basic commands to make a repository for our examples: Now we have a git repository with one file and one commit, that is to say, one “version”. ~/mysite$ echo "<center>Cats are cute. With me so far? The Repository User Interface

http://nfarina.com/post/9868516270/git-is-simpler

Related:  Git howtoLinux

Why aren't you using git-flow? Vincent Driessen's branching model is a git branching and release management strategy that helps developers keep track of features, hotfixes and releases in bigger software projects. This workflow has lot of commands to type and remember, though, so there's also the git-flow library of git subcommands that helps automate some parts of the flow to make working with it a lot easier. After installing git-flow (brew install git-flow), you can start using git-flow in your repository by using it's init command. Create a "mountable" disk image in GNU/Linux In this article I will explain how to create a file that works like a USB drive -- without the "physical" side of a USB disk. The advantage of making such a file is that you can make it encrypted; as a result, nobody will ever be able to see what's in it unless they know the passphrase. As a first step, simply create a file that acts as a plain, un-encrypted container of information. First of all, create an empty file: fallocate -l 512M image.iso

Git - Revision Control Perfected In 2005, after just two weeks, Linus Torvalds completed the first version of Git, an open-source version control system. Unlike typical centralized systems, Git is based on a distributed model. It is extremely flexible and guarantees data integrity while being powerful, fast and efficient. With widespread and growing rates of adoption, and the increasing popularity of services like GitHub, many consider Git to be the best version control tool ever created. Surprisingly, Linus had little interest in writing a version control tool before this endeavor.

Learn.GitHub - Git Tagging Create signed, unsigned, or lightweight tags to permanantly mark important points in your project history Like most VCSs, Git has the ability to ‘tag’ specific points in history as being important - generally people use this to mark release points (‘v1.0’, etc). In this lesson we will learn how to list the available tags, how to create new tags, and what the different types of tags in Git are. Simply listing the available tags in Git is very straightforward.

Git Workflows Why use git? Git is an extremely powerful source control system. Its power lies in its speed and flexibility, but this can also be a point of confusion for many new users. Git is unfortunately quite inconsistent in its syntax, and exposes many of its not-so-friendly internals to the outside world, sometimes to the detriment of usability. CPU frequency scaling CPU frequency scaling enables the operating system to scale the CPU frequency up or down in order to save power. CPU frequencies can be scaled automatically depending on the system load, in response to ACPI events, or manually by userspace programs. CPU frequency scaling is implemented in Linux kernel, the infrastructure is called cpufreq. Since kernel 3.4 the necessary modules are loaded automatically and the recommended ondemand governor is enabled by default.

Scott Chacon on the Interwebs August 31, 2011 Issues with git-flow I travel all over the place teaching Git to people and nearly every class and workshop I’ve done recently has asked me what I think about git-flow. I always answer that I think that it’s great - it has taken a system (Git) that has a million possible workflows and documented a well tested, flexible workflow that works for lots of developers in a fairly straightforward manner. It has become something of a standard so that developers can move between projects or companies and be familiar with this standardized workflow. Changing Git History This document describes how to modify commit messages in Git after the fact. Changing the Last Commit Message If you only want to modify your last commit message, it is very simple. Just run

Conversational Git: The Friendly Introduction to Git This post is an excerpt from my new book, Conversational Git. The entire book is available online and its source is on GitHub. It’s designed to be a quick, accessible introduction for experienced developers. I’d be delighted to hear what others think. I recently had some close friends talk about their hesitation in adopting Git as opposed to continuing to work with Subversion. I’ve used Subversion for many years, and advocated for its use. A successful Git branching model » nvie.com In this post I present the development model that I’ve introduced for some of my projects (both at work and private) about a year ago, and which has turned out to be very successful. I’ve been meaning to write about it for a while now, but I’ve never really found the time to do so thoroughly, until now. I won’t talk about any of the projects’ details, merely about the branching strategy and release management.

Using Git to manage a web site The HTML source for my (i.e., this) web site lives in a Git repository on my local workstation. This page describes how I set things up so that I can make changes live by running just "git push web". The one-line summary: push into a remote repository that has a detached work tree, and a post-receive hook that runs "git checkout -f". The local repository

Git: Interactively Stage Portions of a Single Changed File for Commit Using git add -p The thing which makes Git powerful as a version control system is its flexibility, and the many ways exposed by the Git API to get things done. Of course, this is also what can make Git challenging to learn and use. There are so many options available that it can be difficult to know how to approach a specific problem. On top of that, the Command Line Interface (CLI) for Git, and the underlying API employ a syntax which is . . . inconsistent at times, and definitely not intuitive for the uninitiated. Image by Kai Yan, Joseph Wong, Some Rights Reserved This article is targeted at those newer to Git, who may be trying to find their way through some of the more advanced features for the first time.

Use GNURoot to install a GNU/Linux distribution on your Android device How many times have you been on the go and discovered that you needed to pull off some Linux-fu, but the only piece of tech you had was an Android device? Imagine if you were able to fire up a Linux command prompt on that device and make use of apt-get to install whatever command line tool you needed. Wget? No problem. Traceroute? Yes.

Related: