background preloader

Git

Facebook Twitter

Linus Torvalds: Kernel SCM saga.. 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. 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: ~$ mkdir mysite ~$ cd mysite ~/mysite$ echo "<title>All About Cats</title>" > index.html ~/mysite$ git init ~/mysite$ git add index.html ~/mysite$ git commit -m "First commit, added a title. " With me so far? A Git Primer. Git is a wicked-powerful distributed revision control system.

It is confusing to many, so there are myriad tutorials and explanations online to help people understand it. This one will focus on the fundamental concepts and tasks rather than trying to compete with the documentation. “I’m an egotistical bastard, and I name all my projects after myself. First Linux, now git.” ~ Linus Torvalds Definitions Working Directory - the working directory is the directory where you have content that you want to manage with git.

Commit - a commit is a full snapshot of the contents of your working directory (everything being tracked by git, anyway), and it’s kept track of using a unique 40 character SHA1 hash. Index - the index can be considered a staging area. Branch - a branch is similar in concept to other versioning systems, but in git it’s simply a pointer to a particular commit. Understanding how these components work together is the key to understanding git. git‘s Index $ git status On branch master Tags. Hub. A few git tips you didn't know about. Notice: some of these commands or flags require git version 1.7.2. On OS X, upgrade easily with Homebrew: brew install git Show branches, tags in git log $ git log --oneline --decorate 7466000 (HEAD, mislav/master, mislav) fix test that fails if current dir is not "hub" 494a414 fix cherry-pick of a commit URL 4277848 (origin/master, origin/HEAD, master) whoops d270fae bugfix: git init -g 9307af3 test deps 8ccc17e 64bb19c bugfix: variable name 546726a dont need you 3a8d7af (tag: v1.3.1) v1.3.1 197f429 (tag: v1.3.0) v1.3.0 a1e1a50 not important 3c6af16 magic `cherry-pick` supports GitHub commit URLs and "user@sha" notation Diff by highlighting inline word changes instead of whole lines $ git diff --word-diff # Returns a Boolean. def command?

This flag works with other git commands that take diff flags such as git log -p and git show. Short status output $ git status -sb M ext/fsevent/fsevent_watch.c ?? Push a branch and automatically set tracking. Git Cheatsheet. GitHub Firewall Install. Technical Jargon. Last month I posted about hosting a git server under IIS by using GitAspx. While this is certainly one way to host a git server on windows, I wouldn’t recommend this in a production environment.

An alternative (and somewhat more stable) approach is to use the native implementation of git-http-backend that ships with msysgit along with Apache. Step 1: Install Git Firstly you’ll need to install msysgit. Once installed, you’ll need to tweak the installation slightly. In order to fix this, copy libiconv2.dll from C:Program Files (x86)Gitbin to C:Program Files (x86)Gitlibexecgit-core Now when you run git-http-backend.exe from a command prompt, the application should run and you should see an HTTP 500 server error: Step 2: Install Apache Next you’ll need to install the Apache webserver. If you visit at this point you should be greeted with Apache’s standard “It works!” Step 3: Create Repositories Directory Create the directory where you want to store your git repositores. Shadowhand/git-encrypt - GitHub. Using Beyond Compare For Merges in Git on Windows.

Tv's cobweb: Git for Computer Scientists. Abstract Quick introduction to git internals for people who are not scared by words like Directed Acyclic Graph. Storage In simplified form, git object storage is "just" a DAG of objects, with a handful of different types of objects. They are all stored compressed and identified by an SHA-1 hash (that, incidentally, isn't the SHA-1 of the contents of the file they represent, but of their representation in git). blob: The simplest object, just a bunch of bytes. Tree: Directories are represented by tree object. When a node points to another node in the DAG, it depends on the other node: it cannot exist without it. Commit: A commit refers to a tree that represents the state of the files at the time of the commit.

Refs: References, or heads or branches, are like post-it notes slapped on a node in the DAG. Git commit adds a node to the DAG and moves the post-it note for current branch to this new node. The HEAD ref is special in that it actually points to another ref. History. Why might git log not show history for a moved file, and what can I do about it. A successful Git branching model » nvie.com. Note of reflection (March 5, 2020)This model was conceived in 2010, now more than 10 years ago, and not very long after Git itself came into being. In those 10 years, git-flow (the branching model laid out in this article) has become hugely popular in many a software team to the point where people have started treating it like a standard of sorts — but unfortunately also as a dogma or panacea.During those 10 years, Git itself has taken the world by a storm, and the most popular type of software that is being developed with Git is shifting more towards web apps — at least in my filter bubble.

Web apps are typically continuously delivered, not rolled back, and you don't have to support multiple versions of the software running in the wild.This is not the class of software that I had in mind when I wrote the blog post 10 years ago. Why git? ¶ For a thorough discussion on the pros and cons of Git compared to centralized source code control systems, see the web.

The main branches ¶ develop. Gerrit - Project Hosting on Google Code. Project Information ekem... @google.com, david.pu... @sonymobile.com, mf... @codeaurora.org, sasa.ziv... @sap.com, spea... @spearce.org, edwin.ke... @gmail.com, ziv... See. Code Review with Gerrit, a mostly visual guide | unethical blogger. Virtual Hosting with HAProxy and WSGI ? 8 hours ago schiffsratte Cool this is exactly what I was looking for, just before I was changing all my name based vhost to ip based ones . Thank you for sharing J? Rgen Tjern? I wonder if there are impatient twats who put "Sent from my iPhone" as the signature on their desktop client. ;-) applications of facebook you have the perfect idea for a Facebook-only application, there are a few things you? The Jenkins continuous integration server gets a fancy new logo! Julian Leyh's (oenone) ridiculously prolific churning out of Ada solutions for RosettaCode problems (Dude, thanx!) A while ago, when Paul , Jason and I worked together, I became a big fan of code reviews before merging code.

I recommend building Gerrit from source for now, spearce is planning a proper release of the recent Gerrit developments shortly before Christmas, but who has that kind of patience! First you should clone one of Gerrit's dependencies, followed by Gerrit itself: