background preloader

Git

Facebook Twitter

Home. Git Extensions. Guide Pas à Pas. Git Tutorial. Git bare vs. non-bare repositories. Posted by: Kim N. Lesmer on 09.10.2010 The Git revision control system has something called a "bare" and a "non-bare" repository. This article deals with the issue and also compares the Git design to the design of Mercurial and Bazaar. NB! The other day I was working with Git and I got the following error after having tried to push some changes back to a remote repository that I had created.

I didn't understand this error and being used to how Mercurial works, this didn't make any sense, so I did some diggin. In the ideal world of distributed revision control there is no central repository. In the real world a central repository with push access is sometimes necessary and all the different distributed revision control systems allows this, but the way they deal with a push are very different. In a distributed revision control system you work with a local repository that contains both the working tree and the revision history. In Git you can create such a repository with the following command: Git Magic. 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. C’est une approche intéressante pour Git : les débutants peuvent ignorer ses mécanismes internes et l’utiliser comme une baguette magique afin d'époustoufler les amis et rendre furieux les ennemis par ses fabuleuses capacités. 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. Git Book - Distributed Workflows. Unlike Centralized Version Control Systems (CVCSs), the distributed nature of Git allows you to be far more flexible in how developers collaborate on projects. In centralized systems, every developer is a node working more or less equally on a central hub. In Git, however, every developer is potentially both a node and a hub — that is, every developer can both contribute code to other repositories and maintain a public repository on which others can base their work and which they can contribute to.

This opens a vast range of workflow possibilities for your project and/or your team, so I’ll cover a few common paradigms that take advantage of this flexibility. I’ll go over the strengths and possible weaknesses of each design; you can choose a single one to use, or you can mix and match features from each. Centralized Workflow In centralized systems, there is generally a single collaboration model—the centralized workflow. Figure 5-1. Integration-Manager Workflow Figure 5-2. Figure 5-3. 8 ways to share your git repository. This blogpost provides a summary of different ways to share a git repository. Depending on your needs you can opt for different solutions. Preparation:Git enable a simple project-X Let's say you have project called project-X that you have been working on, on your local machine.

It contains one file called README. To enable git on this project you can: $ cd $HOME/project-X # git init enables the git repository $ git init # You add the readme file to the repository $ git add README # You commit your changed to your local repository $ git commit -a -m 'Added README' this will give you a .git directory in the project-X directory , ready to use in this tutorial Share it over a file share Instead of having people reference your local repository, you can put your repository on a file share. Preparing the repository Pushing your local repository to the shared repository Share using git-daemon. Utiliser p4merge. Git doesn’t come with a merge tool, but will gladly use third party tools… The Git Debate The reoccurring debate on switching from svn to git is going on again on the Ruby Core mailing list. Amoung the many objections to git is that it doesn’t come with a nice merge tool. Perforce was held up as an example of a tool that does merging right.

Although I’m not a big fan of perforce in general, the merge tool in perforce was one of its two redeeming aspects. Now You Can Have Your Cake and Eat it Too! Although it is correct that git doesn’t come with a nice merge tool, it is quite happy to use any merge tool that you have on hand. Just add the following to your .gitconfig file in your home directory: [merge] summary = true tool = "p4merge" [mergetool "p4merge"] cmd = /PATH/TO/p4merge \ "$PWD/$BASE" \ "$PWD/$LOCAL" \ "$PWD/$REMOTE" \ "$PWD/$MERGED" keepBackup = false trustExitCode = false Now, whenever git complains that a conflict must be resolved, just type: git mergetool Enjoy. Update (6/Sep/09) #!