background preloader

Git

Facebook Twitter

[work] hub · the command-line wrapper for git - Iceweasel (Build 20131020004007) Reset Demystified – Scott Chacon - Iceweasel. July 11, 2011 One of the topics that I didn't cover in depth in the Pro Git book is the reset command. Most of the reason for this, honestly, is that I never strongly understood the command beyond the handful of specific use cases that I needed it for. I knew what the command did, but not really how it was designed to work. Since then I have become more comfortable with the command, largely thanks to Mark Dominus's article re-phrasing the content of the man-page, which I always found very difficult to follow.

This post assumes some basic understanding of how Git branching works. The Three Trees of Git The way I now like to think about reset and checkout is through the mental frame of Git being a content manager of three different trees. Git as a system manages and manipulates three trees in its normal operation. The HEAD last commit snapshot, next parent In fact, it's pretty easy to see what the snapshot of your HEAD looks like.

The Index next proposed commit snapshot The Workflow Overview. Deliberate Git - Iceweasel. A Note About Git Commit Messages - Iceweasel. 19 Apr 2008 I want to take a moment to elaborate on what makes a well formed commit message. I think the best practices for commit message formatting is one of the little details that makes Git great. Understandably, some of the first commits to rails.git have messages of the really-long-line variety, and I want to expand on why this is a poor practice. Here’s a model Git commit message: Capitalized, short (50 chars or less) summary More detailed explanatory text, if necessary. Let’s start with a few of the reasons why wrapping your commit messages to 72 columns is a good thing. git log doesn’t do any special special wrapping of the commit messages.

Vim users can meet this requirement by installing my vim-git runtime files, or by simply setting the following option in your git commit message file: :set textwidth=72 $ defaults write com.macromates.textmate OakWrapColumns '( 40, 72, 78 )' More important than the mechanics of formatting the body is the practice of having a subject line. Pour arrêter de galérer avec Git « Développeur web freelance - Iceweasel. J'adore Git ! Depuis 5 ans que je l'utilise quotidiennement, je ne me lasse pas d'admirer la puissance sublime de cet outil, et je ne compte plus les fois ou ma vie fut sauvée par l'une ou l'autre de ces obscures mais miraculeuses commandes.

D'ailleurs, n'est-ce pas Aristote qui as dit « Donnez-moi vim et git, et je soulèverai le monde » ? Ce n'est pas un hasard si en Swahili, « Git » signifie « divinité toute puissante à la sagacité du renard, la volupté de l'hippopotame et la virilité du bonobo ». Je dois pourtant reconnaître que Git n'est pas forcément l'outil le plus abordable qui soit. Toutes ces commandes bizarres ! C'est surtout après avoir eu l'occasion de donner une formation de 2 jours sur Git récemment que j'ai pu vraiment approfondir certains concepts, résoudre un certain nombre de « WTF ?! Tenez, prenez l'exemple suivant : Comment j'annule une modification d'un fichier ?

Git checkout Ok, comment je change de branche ? Ok, et comment je créé une nouvelle branche ? Heu… Quoi ?! Configuring git colors (Shallow Thoughts) - Iceweasel. I spent a morning wrestling with git after writing a minor GIMP fix that I wanted to check in. Deceptively simple ideas, like "Check the git log to see the expected format of check-in messages", turned out to be easier said than done. Part of the problem was git's default colors: colors calculated to be invisible to anyone using a terminal with dark text on a light background. And that sent me down the perilous path of git configuration. git-config does have a manual page. But it lacks detail: you can't get from there to knowing what to change so that the first line of commits in git log doesn't show up yellow.

But that's okay, thought I: all I need to do is list the default settings, then change anything that's a light color like yellow to a darker color. Easy, right? Well, no. But you can find most of them with a seach for GIT_COLOR in the source. Gitconfig The next step is to translate those C lines to git preferences, something you can put in a .gitconfig. A quick guide to pull requests « Otaku, Cedric's blog - Iceweasel. It’s pretty common for projects hosted on GitHub to receive “pull requests”: requests from people who have cloned your project, made a modification to it and then asking you to merge their changes back into the main project. There are a lot of ways you can handle these pull requests, here are some of them. Using GitHub’s web interface If you go to the “Fork Queue” panel of your GitHub dashboard, you will see all the pull requests that have been issued by contributors.

From this page, you can apply changes directly to the specified branch, which means that you will automatically get them on your local machine next time you pull. I rarely use the web interface because I usually want to test the changes on my machine before committing them. Having said that, the web interface is convenient to quickly apply cosmetic commits that don’t change any code (documentation updates, space clean up, etc…). git am The git am command allows you apply a diff to your working directory. Cherry picking. DVCS - 2011-12-14_18-26-19_395_dvcs_compresse.mp4 - YouTube - Iceweasel. Everything I know about git - Iceweasel. Git -- a distributed version control system - Iceweasel. Chapitre 1. Introduction - Iceweasel. Je vais me servir d’une analogie pour présenter la gestion de versions. Référez-vous à la page de wikipedia sur la gestion de versions pour une explication plus censée. J’ai joué à des jeux vidéos presque toute ma vie.

Par contre, je n’ai commencé à utiliser des systèmes de gestion de versions qu'à l'âge adulte. Je pense ne pas être le seul dans ce cas et la comparaison entre les deux peut rendre les concepts plus simples à expliquer et à comprendre. Pensez à l'édition de votre code, ou de votre document, comme s’il s’agissait de jouer à un jeu. Quand vous avez bien progressé, vous aimeriez faire une sauvegarde. Pour cela vous cliquez sur le bouton enregistrer de votre fidèle éditeur. Mais ceci va écraser l’ancienne version. Lorsque vous modifiez un document, dans le but de conserver les anciennes versions, vous pouvez l'"Enregistrer Sous…" un nom de fichier différent ou le recopier ailleurs avant de l’enregistrer.

Rendons le problème légèrement plus coriace. Tomtom/quickfixsigns_vim · GitHub - Iceweasel. Git cheat sheet, extended edition « Creative Engineering - Iceweasel. A few days ago, I posted a cheat sheet for Git (just as last time, Git is a really cool revision control system). Let’s face it: it was ugly. Not something you would actually hang up where other people could see it, was it? Here’s the remedy, which also works on both A4 and Letter and is more detailed. In more detail, the additional details are: The old “structure overview” diagram showing the big picture of repositories and working trees is now a lot bigger and a lot more detailed. It comes along with a glossary, a few notes on getting started, a list of useful tools you may want to look at, and links to the most important websites of all (cough).The whole workflow diagram is gone since it was not really all that clear. So how’s it look like? Because Inkscape saw fit to generate annoyingly huge PDF files from the source, this time you get a zipped two-page PDF document as well as the Inkscape source files.

Another thing that I didn’t pay attention to last time was the license. Git Cheat Sheet (PDF) - Iceweasel. Git. Installer son propre serveur git avec Gitolite – Partie 3. J’ai déjà pas mal parlé de la configuration d’un serveur git auto-hébergé, ce type de solution permet de se passer de Github (ou BitBucket) pour héberger ses dépots privés. Lors de mon premier article, je n’avais pas voulu utiliser d’outil pour faire la configuration du serveur, mais après avoir beaucoup pratiqué gitolite au travail, j’ai décidé de migrer mes dépôts de la configuration standard vers gitolite et j’ai décidé d’en profiter pour faire l’article final de cette série… Cet article s’adresse aux personnes étant déjà à l’aise avec git. Je ne vais pas trop rentrer dans les détails techniques, si jamais vous ne comprenez pas tout, vous pouvez lire le Git Book les premières parties de la configuration d’un serveur git : Si vous êtes déjà à l’aise avec git, oubliez la première partie car Gitolite remplace parfaitement l’environnement mis en pace lors du premier article… Installation de gitolite $> adduser --system --shell /bin/bash --group --disabled-password --home /var/git git.

Add / commit / push / pull / fetch graphical explanation. Committed 21 Jan 2009 Today we’re going to review another basic yet powerful concept that Git among other version control systems of its type has: distribution! As you may know, your commits are all local, and repositories are simply clones of each other. That means the real work in distributing your projects is in synchronizing the changes via git push and git pull. If you’re new to Git, you may think that this is too much overhead and one that leads to a breakdown of control. Look at it this way: if your central server goes down, you’re usually hosed and prevented from working and collaborating with others. Since all of the work involved with actually creating revisions is done on your own machine, you can code whether the network is down without the permission of others or being subject to network issues.

Oliver Steele has whipped up a great image of how pushing and pulling works: The topmost part of the diagram is easy, that’s committing your changes to the staging area. Git ready » learn git one commit at a time - Iceweasel. The Garvin - "Git is just too hard" - Iceweasel. Here's the sentiment that's been delivered to me on several occasions by different people: "Git is too hard, and Subversion is good enough. " It saddens me when I hear this. Why does it sadden me? Because some very smart developers are missing out on a great tool that can improve how they work, and enable cleaner project histories. Basic Git usage is easy I'd like to dispense with the "Git is too hard" complaint.

As I write this, Github's home page says that they have 155,000 coders using their service. That's my argumentum ad numerum: one hundred thousand developers can't be wrong! How might we objectively prove that Git is, in fact, not "too hard" when compared to Subversion? Go look at the Git-SVN Crash Course , where you'll see examples of equivalent commands in Subversion and Git. Using Subversion: # get the code svn checkout # ... make some changes, then commit them ... svn commit Using Git: Once you understand Git, Subversion is obsolete Make the switch . Resources. Paris JUG - 20110412 - Iceweasel. Vidéos Date et lieu Mardi 12 avril 2011 Dans les locaux de l' ISEP Les inscriptions seront ouvertes à partir du jeudi 7 avril 07h00 sur cette page.

Suivez aussi le Parisjug sur Twitter( @parisjug ) pour être informé rapidement. Inscriptions closes, il ne reste plus de places !!! ATTENTION : Les inscrits à l'évènement non présents 5 min avant le début de la session , soit à 19h25 , verront leur place remise à disposition Les non inscrits à l'évènement ne pourront donc y assister que sous réserve de places disponibles sur place 5 min avant le début de la session , soit à 19h25. L’inscription implique de posséder une adresse mail valide sur laquelle vous recevrez une demande de confirmation à laquelle il vous faudra répondre afin de valider votre inscription. Détails 19h15 à 19h30 : Accueil 19h30 à 20h25 : Git en théorie Utilisateur de SVN pendant de nombreuses années, j'avais la sensation croissante de me battre avec mon outil de travail.

Intervenant : Sebastien Douche Platinium Gold. A successful Git branching model » nvie.com - Iceweasel. 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. Git - the simple guide - no deep shit! - Iceweasel. Git - the simple guide just a simple guide for getting started with git. no deep shit ;) by Roger Dudler credits to @tfnico, @fhd and Namics this guide in deutsch, español, français, indonesian, italiano, nederlands, polski, português, русский, türkçe, မြန်မာ, 日本語, 中文, 한국어 Vietnamese please report issues on github Infuse analytics everywhere with the AI-powered embedded analytics platform. Start your free trial.ads via Carbon setup Download git for OSX Download git for Windows Download git for Linux create a new repository create a new directory, open it and perform a git init to create a new git repository. checkout a repository create a working copy of a local repository by running the command git clone /path/to/repository when using a remote server, your command will be git clone username@host:/path/to/repository workflow add & commit You can propose changes (add it to the Index) using git add <filename> git add * This is the first step in the basic git workflow.

Pushing changes branching log. #gitfr - Iceweasel.