Documentation Documentation Reference Reference Manual The official and comprehensive man pages that are included in the Git package itself. Quick reference guides: GitHub Cheat Sheet | Visual Git Cheat Sheet Book Pro Git The entire Pro Git book written by Scott Chacon and Ben Straub is available to read online for free. Videos See all videos → External Links The External Links section is a curated, ever-evolving collection of tutorials, books, videos, and other Git resources. Git has_many :through - Agile git and the story branch pattern I've been using git for source code management for over a year now and I'm totally hooked. I won't rave about all the usual reasons WhyGitIsBetterThanX since it's been done already. Instead, I'm going to share how I use git for easy agile development. The basic idea is to never do anything in the master branch except use it to move changes between the remote repo and local branches. Keeping master clean takes very little effort and will save your bacon when you get into trouble. The example I'll use here is working on a story to render title text in a bold style on a page. 1. What do you mean you're not using Pivotal Tracker? 2. $ git checkout master $ git pull $ rake db:migrate # if there are new migrations $ rake # if you don't have a CI server 3. $ git checkout -b bold_titles 4. Since you are committing locally, you can commit often. $ git commit -am "Don't bold empty titles" When you are done... $ rake $ git commit -am "Render titles with bold style" 5. a. $ git diff master b. c. $ rake d.
Why DVCS provides better central control « Software Whys I previously discussed how distributed version control systems (DVCS) can help with keeping the tip always compilable. DVCS is also useful in making sure the tip always passes a test suite, or maintains any other standard of quality. It does this by giving more control where control is needed. When you first hear about DVCS, that statement seems counter-intuitive. In our company we have product-specific code for a number of embedded products, and a large base of code shared between products. So how can we set up our branches to mitigate this problem? We want the “official” branch for a product to consist of a series of successfully tested builds. Here we have the log for a fictional Product A. Okay, so where do the developers come in? At this level you can clearly see which features made it into each promoted build. This shows the changes for Product A as if Product A is the most important product in the world. Another method we use to improve code quality is code reviews. Like this:
Git Source Control Provider Recherche et téléchargement de fichiers sur Github Github est un service formidable où les gens stockent leurs codes sources et leurs projets... Mais c'est aussi une mine d'or de fichiers en tout genre. Certains utilisateurs de Github font d'ailleurs preuve de négligence et synchronisent même parfois des fichiers contenant des mots de passe en clair ou des infos plus ou moins confidentielles. Pour effectuer ce genre de recherches sur Github, il existe un petit script python qui permet tout simplement de récupérer sur votre ordinateur, les fichiers qui vous intéressent. Par exemple, en tapant : . vous récupérerez tous les historiques bash qui trainent. . vous récupérerez tous les htpasswd qui trainent . vous récupérez des boites mails qui trainent . et des logins/passwords de connexions à des bases de données. Je ne passe pas tout en revue. Pour installer ghrabber, il faut faire un petit : sudo easy_install pip sudo pip install beautifulsoup requests Puis téléchargez ghrabber ici. Vous avez aimé cet article ?
A Gaggle Of Git Tips | Web Development Blog: Web Development Insights, Best Practices, Tips & Techniques : Viget Labs Almost a year ago, our first post about Git hit this blog. Since then, our posts about Git have been popular with you, our readers. Clinton’s overview of git-svn, for example, remains one of our most popular posts, months after he first wrote it. Like much of the Ruby and Rails world, we’re using Git every day, and finding little ways to exploit its power for fun and profit. This post brings together several of our little Git discoveries. Tony Pitale: My favorite Git tool that I’ve never heard of before a few weeks ago is git-bisect. $ git bisect start$ git bisect bad$ git bisect good 128dafd75384f42c2544acd28d432c8abef79878 Once that’s done, it’ll go through the tree and help to pinpoint changed commits that may cause the breakage. If you have a lot of commits between good and bad, you can checkout, run tests and add to the list of good or bad commits. (Brian Landau adds: I like the idea of git bisect but haven’t used it yet myself. Justin Marney: $ git rebase -i HEAD~3 Patrick Reagan:
Git for the lazy - Spheriki From Spheriki Git is a distributed version control system . No, you don't need to know what that means to use this guide. Think of it as a time machine: Subversion or CVS without the cruft. If you make a lot of changes, but decided you made a mistake, this will save your butt. This guide is for people who want to jump to any point in time with their project/game/whatever, and want something to use for themselves. Windows For Windows, you have two options: msysGit Download and install msysGit to use Git in Windows's cmd.exe console. Cygwin Download Cygwin . Put setup.exe in a folder of its own in your documents. Launch setup.exe . While installing Cygwin, pick these packages: from the DEVEL category (if you're wimpy) or (if you know it), both in the EDITORS category You'll now have a shortcut to launch Cygwin, which brings up something like the Linux terminal. Linux Install the git package using your preferred method (package manager or from source). Fire up your Cygwin/Linux terminal, and type: git init
Introducing GitHub For Windows For the past several months I’ve been working on a project with my amazing cohorts, Paul, Tim, and Adam, and Cameron at GitHub. I’ve had the joy of learning new technologies and digging deep into the inner workings of Git while lovingly crafting code. But today, is a good day. We’ve called the shipit squirrel into action once again! We all know that the stork delivers babies and the squirrel delivers software. In our case, we are shipping GitHub For Windows! gh4w-app If you’re not familiar with Git, it’s a distributed version control system created by Linus Torvalds and his merry Linux hacking crew. Better Git on Windows In recent history, this has started to change due to the heroic efforts of the MSysGit maintainers who’ve worked hard to provide a distribution of Git that works well on Windows. GitHub for Windows (or GH4W for short) builds on those efforts to provide a client to Git and GitHub that’s friendly, approachable, and inviting. Installation gh4w-default-shells Custom Shell
Migrer d'un serveur git à un autre Dans une entreprise, ça bouge beaucoup, et en général, le code suit le mouvement… Si vous voulez migrer du code d’un serveur git à un autre, alors il y a une méthode toute simple : utiliser le script ci-dessous. C’est tout simple, il suffit de copier / coller le script dans un fichier et de le lancer en ligne de commande. Il faudra toutefois, avant les réjouissances, paramétrer quelques variables d’environnement, en tapant simplement (et par exemple) : GIT_SERVER_FROM=git@github.cedrik.frGIT_SERVER_TO=git@gitlab.digitas.frREPO_PREFIX=:myproject/REPOS= »core module1 module2″ Cela migrera : les projets : core + module1 + module2à partir de : git@github.cedrik.fr:myproject/Vers : git@gitlab.digitas.fr:myproject/ Et voilà ! [Ce script a été vu pour la première fois sur TechRevolutions.fr] Vous aimez cet article ? Partage
Git Protip: A picture is worth a thousand words (git tag) | unethical blogger Scott Oberlin Most ppl don't know this, but Apple computer hardware is actually manufactured by Asus (which is why the hardware is good even if the software stinks!) Virtual Hosting with HAProxy and WSGI · 3 weeks 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 . Jørgen Tjernø I wonder if there are impatient twats who put "Sent from my iPhone" as the signature on their desktop client. ;-) rtyler created branch master at rtyler/maildir-notifier rtyler created branch issues19 at rtyler/jenkins.rb Alpha release of the GitHub Mylyn connector for Eclipse WSJ: Microsoft to buy Skype for $7bn. Monitoring better with Behavior Driven Infrastructure and Cucumber Weighing test structure and readability with RSpec and Test::Unit Git Protip: A picture is worth a thousand words (git tag) Tim is extremely busy, most of his days working at an exciting, fast-paced start-up seem to fly by. The second option is to make use of tags.
Git Reference Getting and Creating Projects In order to do anything in Git, you have to have a Git repository. This is where Git stores the data for the snapshots you are saving. There are two main ways to get a Git repository. docs book git init initializes a directory as a Git repository To create a repository from an existing directory of files, you can simply run git init in that directory. $ cd konnichiwa$ ls README hello.rb This is a project where we are writing examples of the "Hello World" program in every language. $ git init Initialized empty Git repository in /opt/konnichiwa/.git/ Now you can see that there is a .git subdirectory in your project. $ ls -a . .. .git README hello.rb Congratulations, you now have a skeleton Git repository and can start snapshotting your project. In a nutshell, you use git init to make an existing directory of content into a new Git repository. docs book git clone copy a git repository so you can add to it On to Basic Snapshotting »
A web-focused Git workflow After months of looking, struggling through Git-SVN glitches and letting things roll around in my head, I’ve finally arrived at a web-focused Git workflow that’s simple, flexible and easy to use. Some key advantages: Pushing remote changes automatically updates the live siteServer-based site edits won’t break historySimple, no special commit rules or requirementsWorks with existing sites, no need to redeploy or move files Overview The key idea in this system is that the web site exists on the server as a pair of repositories; a bare repository alongside a conventional repository containing the live site. Two simple Git hooks link the pair, automatically pushing and pulling changes between them. The two repositories: Hub is a bare repository. Using the pair of repositories is simple and flexible. Getting ready Obviously Git is required on the server and any local machines. If this is the first time running Git on your webserver, remember to setup your global configuration info. Getting started
Gogs – Installer un serveur Git avec interface web en moins de 10 secondes « Si vous voulez vous monter un petit serveur Git avec interface web, en 2 secondes 12, c'est possible avec Gogs. Développé en Go, Gogs (pour Go Git Service) tourne sous OSX, Linux, Windows, ARM (Raspberry Pi, Synology avec l'aide de Docker...etc) et nécessite très peu de choses. Une base MySQL ou PostgreSQL ou rien du tout, car SQLite3 et TiDB sont supportés aussiGitEt une machine qui dispose d'un serveur SSH si vous voulez que votre serveur Git soit accessible via SSH. Si vous avez prévu de tout faire en HTTP/HTTPS, ce n'est pas nécessaire. Ensuite il suffit de télécharger Gogs ici et de lancer le binaire comme ceci : . Notez que des versions Docker et Vagrant sont aussi dispo. Et voilà ! Trop magique ! Source Rejoignez les 56215 korbenautes et réveillez le bidouilleur qui est en vous Suivez KorbenUn jour ça vous sauvera la vie..