background preloader

Tech Talk: Linus Torvalds on git

Tech Talk: Linus Torvalds on git
Related:  Git git

Git Setting up a cloned git repo I was going to set up a clone of the xserver git repo in my people.freedesktop.org home directory and I figured I'd document the steps. If you want the cheat sheet just skip to the last couple of paragraphs. First of all, to set up a repo I need ssh access to people.freedesktop.org, but since I was going to put the repo in my home directory there, I already have that. Now, the official git repos are read only mounted on /git, so the obvious thing to do is to say krh@annarchy:~$ git clone --bare /git/xorg/xserver.git xserver.git Initialized empty Git repository in /home/krh/xserver.git/ ... krh@annarchy:~$ du -sh xserver.git/ 24M xserver.git/ Most of this space is in the objects representing the files, directories and commits of the project history. krh@annarchy:~$ du -sh /git/xorg/xserver.git/ 135M /git/xorg/xserver.git/ But given that both repos are on the same filesystem, we can ask git clone to share the underlying objects. krh@annarchy:~$ touch xserver.git/git-daemon-export-ok

tortoisegit - Porting TortoiseSVN to TortoiseGit Git Version of TortoiseSVN. It is a port of TortoiseSVN for Git. TortoiseGit supports you by regular tasks, such as committing, showing logs, diffing two versions, creating branches and tags, creating patches and so on (see our Screenshots or documentation). You're welcome to contribute to this project (help on coding, documentation, Translation, testing preview releases or helping other users on the mailing lists is really appreciated). If you upgraded to TortoiseGit 1.8.8.0 and TortoisePLink reports "missing MSVCR110.dll", go to TortoiseGit settings, Network and select "TortoiseGitPLink.exe" as ssh client (which is located in the TortoiseGit\bin directory; issue #2156 ). There seems to be a bug in the MFC library, so please make sure you have the latest service pack installed. The latest and recommended release of TortoiseGit is: 1.8.8.0, see ReleaseNotes for details. Download TortoiseGit System prerequisites and installation howto Get a full list of screenshots. Context menu Commit Dialog

Git - SVN Crash Course Welcome to the Git version control system! Here we will briefly introduce you to Git usage based on your current Subversion knowledge. You will need the latest Git installed; There is also a potentially useful tutorial in the Git documentation. This page is not maintained anymore! How to Read Me In those small tables, at the left we always list the Git commands for the task, while at the right the corresponding Subversion commands you would use for the job are listed. Before running any command the first time, it's recommended that you at least quickly skim through its manual page. Things You Should Know There are couple important concepts it is good to know when starting with Git. Repositories. Commiting For the first introduction, let's make your project tracked by Git and see how we get around to do daily development in it. Now your tree is officially tracked by Git. That's it. Git embeds special information in the diffs about adds, removals and mode changes: Browsing Merging Going Remote

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 ?

git(1) git [--version] [--help] [-c <name>=<value>] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] <command> [<args>] Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. After you mastered the basic concepts, you can come back to this page to learn what commands git offers. You can learn more about individual git commands with "git help command". gitcli(7) manual page gives you an overview of the command line command syntax. Formatted and hyperlinked version of the latest git documentation can be viewed at We divide git into high level ("porcelain") commands and low level ("plumbing") commands. We separate the porcelain commands into the main commands and some ancillary user utilities. git-add(1) gitk(1)

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 User's Manual (for version 1.5.3 or newer) This chapter covers internal details of the Git implementation which probably only Git developers need to understand. A birds-eye view of Git’s source code It is not always easy for new developers to find their way through Git’s source code. This section gives you a little guidance to show where to start. A good place to start is with the contents of the initial commit, with: $ git checkout e83c5163 The initial revision lays the foundation for almost everything Git has today, but is small enough to read in one sitting. Note that terminology has changed since that revision. Also, we do not call it "cache" any more, but rather "index"; however, the file is still called cache.h. If you grasp the ideas in that initial commit, you should check out a more recent version and skim cache.h, object.h and commit.h. In the early days, Git (in the tradition of UNIX) was a bunch of programs which were extremely simple, and which you used in scripts, piping the output of one into another. Now, for the meat:

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 »

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

Related: