
Git Submodules: Adding, Using, Removing, Updating :: Chris Jean I’ve spent a little more than a month working with Git now. I can honestly say that while there are many things that I like about Git, there are just as many things that I personally find to be a pain in the butt. Submodules specifically have managed to be a thorn in my side on many occasions. While the concept of submodules is simple, figuring out how to actually work with them can be a chore. I say “figuring out” because not everything about working with submodules is well documented. What are Submodules? The concept of submodules is brilliant. My profession is working with WordPress themes. Each theme that we produce is kept in its own Git repository. For example, we have a theme called FlexxBold. As I mentioned before, not everything in Git is easy to work with. Adding Submodules to a Git Repository Fortunately, adding a submodule to a git repository is actually quite simple. There are three main parts to this command: Let’s check to see how the repository is doing. Using Submodules
Aha! Moments When Learning Git Git is a fast, flexible but challenging distributed version control system. Before jumping in: Along with a book, tutorial and cheatsheet, here are the insights that helped git click. There's a staging area! Git has a staging area. Yowza, did this ever confuse me. git add foo.txtAdd foo.txt to the index. Why stage? But now there's two undos: git checkout foo.txtUndo local changes (like svn revert)git reset HEAD foo.txtRemove from staging area (local copy still modified). Add and commit, add and commit -- Git has a rhythm. Branching is "Save as..." Branches are like "Save as..." on a directory. Easily merge changes with the original (changes tracked and never applied twice)No wasted space (common files only stored once) Why branch? Imagine virtual directories I see branches as "virtual directories" in the .git folder. My inner dialogue is "change to dev directory (checkout)... make changes... save changes (add/commit)... change to master directory... copy in changes from dev (merge)". Local data
Ignore files From time to time, there are files you don't want Git to check in to GitHub. There are a few ways to tell Git which files to ignore. Create a local .gitignore If you create a file in your repository named .gitignore, Git uses it to determine which files and directories to ignore, before you make a commit. A .gitignore file should be committed into your repository, in order to share the ignore rules with any other users that clone the repository. GitHub maintains an official list of recommended .gitignore files for many popular operating systems, environments, and languages in the github/gitignore public repository. If you already have a file checked in, and you want to ignore it, Git will not ignore the file if you add a rule later. git rm --cached Create a global .gitignore You can also create a global .gitignore file, which is a list of rules for ignoring files in every Git repositories on your computer. git config --global core.excludesfile ~/.gitignore_global Explicit repository excludes
[OBSOLETE] Héberger un serveur Git avec Gitosis (Linux / OSX) • Git Attitude : formations Git qualitatives et sympathiques Il y a plusieurs raisons pour vouloir disposer d’un hébergement Git. Les trois principales sont : disposer d’un backup distant de son travail,mettre son travail à la disposition d’autrui,collaborer avec d’autres sur un projet. Hébergement public ou privé ? Lorsque le projet est libre, ou qu’en tout cas son contenu est public, le plus simple consiste à exploiter un bon service d’hébergement Git qui serait gratuit pour les dépôts publics. Dans ce domaine, l’acteur désormais incontournable (et particulièrement bien foutu) est le célèbre GitHub. En revanche, pour les dépôts privés, soit on reste sur GitHub, mais dès lors, c’est payant (pas cher ceci dit : à partir de $9/mois, ce qui permet de bénéficier de l’infrastructure massive du service, notamment en termes de fiabilité de stockage). Ce billet vise à explorer en détail l’option technique favorite pour héberger son propre serveur Git : Gitosis. Principes de fonctionnement de Gitosis C’est à mon sens une excellente façon de procéder. ou
Git Reference Unlike centralized version control systems that have a client that is very different from a server, Git repositories are all basically equal and you simply synchronize between them. This makes it easy to have more than one remote repository - you can have some that you have read-only access to and others that you can write to as well. So that you don't have to use the full URL of a remote repository every time you want to synchronize with it, Git stores an alias or nickname for each remote repository URL you are interested in. You use the git remote command to manage this list of remote repos that you care about. git remote list your remote aliases Without any arguments, Git will simply show you the remote repository aliases that it has stored. $ git remote origin $ git remote -v origin git@github.com:github/git-reference.git (fetch) origin git@github.com:github/git-reference.git (push) git remote add add a new remote repository of your project Git addeth and Git taketh away.
Understanding Git Conceptually Introduction This is a tutorial on the Git version control system. Git is quickly becoming one of the most popular version control systems in use. A Story When I first started using Git, I read plenty of tutorials, as well as the user manual. After a few months, I started to understand those under-the-hood concepts. Understanding Git The conclusion I draw from this is that you can only really use Git if you understand how Git works. Half of the existing resources on Git, unfortunately, take just that approach: they walk you through which commands to run when, and expect that you should do fine if you just mimic those commands. This tutorial, then, will take a conceptual approach to Git. Go on to the next page: Repositories
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. 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. 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 Gitolite est une surcouche de git pour installer simplement un serveur centralisé, voici quelques une de ses nombreuses qualités : Comme gitolite est un outil simple, l’installation va prendre au maximum 5 minutes, c’est promis. Initialisation Prise en main de la configuration
Tutoriel GIT Auteurs : Bertrand Chazeau, Clément Moussu, Laurent Charignon et Vaibhav Singh. Table des matières I. Objectifs du tutoriel À la fin de ce tutoriel vous : Saurez ce que sont les systèmes de gestions de versions (Concurrent Version System en anglais) Pourrez installer et configurer le système de gestion de version Git Connaîtrez les commandes de bases pour une utilisation quotidienne de Git Aurez la possibilité de travailler de manière flexible à l'aide des branches Ne serez pas perdu avec la cheat sheet et les pointeurs que nous vous fournissons Systèmes de gestions de versions : vocabulaire Un logiciel de gestion de versions (VCS en anglais) permet de stocker les différentes versions d'un ensemble de fichiers afin de faciliter l'évolutivité d'une production informatique. Commit et branche Le mot commit désigne à la fois la création d'une nouvelle version (lorsque c'est un verbe) et cette nouvelle version (lorsque c'est un nom). C0...C5 désignent des versions. Dépôt (Repository) Remote II.
Préface Git est un couteau suisse de la gestion de versions. Un outil de gestion de révisions multi-usage, pratique et fiable, dont la flexibilité en rend l’apprentissage pas si simple, sans parler de le maîtriser ! Comme Arthur C. Clarke le fait observer, toute technologie suffisamment avancée se confond avec la magie. Plutôt que de rentrer dans le détails, nous donnons des instructions pour obtenir tel ou tel effet. Je reste modeste devant le travail fourni par tant de monde pour traduire ces pages. Dustin Sallings, Alberto Bertogli, James Cameron, Douglas Livingstone, Michael Budde, Richard Albury, Tarmigan, Derek Mahar, Frode Aannevik, Keith Rarick, Andy Somerville, Ralf Recker, Øyvind A. François Marier maintient le paquet Debian, créé à l’origine par Daniel Baumarr. Ma gratitude va également à beaucoup d’autres pour leurs encouragements et compliments. Si par erreur je vous ai oublié, merci de me le signaler ou, plus simplement, envoyez-moi un patch ! Hébergement Git gratuit
Version Control for Designers – This works on the assumption the person has no previous knowledge about SCM – What have you done for me lately? Version control, also known as source control or revision control is an integral part of any development workflow. Why? Version control allows programmers to easily communicate their work to other programmersallows a team to share codemaintains separate “production” versions of code that are always deployableallows simultaneous development of different features on the same codebasekeeps track of all old versions of filesprevents work being overwritten What is version control? Version control, alternately known as revision control or source code management, is a system that maintains versions of files at progressive stages of development. There are many different programs for version control. Repository Structure The simplest version control system consists of a repository where all the files and their versions live. Figure 1: A basic source control system Branches Workflow git add .
Git, Mercurial and Bazaar – A Comparison | TechTatva Open-source Version Control Systems have come a long way since the days of CVS. SVN, one of the most successful VCS to be ever used, is now loosing its ground to a new genre of VCS known as DVCS or Distributed Version Control Systems. A DVCS or Distributed Version Control System is a version control software where each working copy contains the full history of all the revisions, thereby making it a fully functional code-base repository and a remote backup to the original code-base. With the increasing size of teams working on the same code-base, the need for DVCS was apparent. We are going to compare the three most popular open-source DVCSs – i.e. Git, Mercurial and Bazaar. Some early DVCS were BitKeeper and Monotone. Git was created after BitKeeper, the original Linux Kernel DVCS, decided to restrict its licensing. Let us see some of the similarities among the three The License: Not to forget! Now for the differences in the three: