Differences between revisions 17 and 18

Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
cg-clone git://paulaner:/home/gelato/linux-2.6-git cg-clone git://paulaner/home/gelato/linux-2.6-git
Line 10: Line 10:
git clone git://paulaner:/home/gelato/linux-2.6-git git clone git://paulaner/home/gelato/linux-2.6-git

Git HowTo

The Cogito package has been removed from most debian package repositories because its packages are no longer being maintained.

The git and git-core packages contain all the necessary tools to manage a git repository, and although none of the commands below will work, altering them slightly should result in working commands. For example, instead of

cg-clone git://paulaner/home/gelato/linux-2.6-git

use

git clone git://paulaner/home/gelato/linux-2.6-git

I will update the rest of this page as time permits.

Cogito(Git)

Git is the replacement Source Code Manager for the Linux kernel, it's late now so I will not go into detail.

I plan to add the Cogito(Git) HowTo here as I discover how to do things:)

  • Clone an existing repository:
      cg-init <URI>||<path>
      cg-init git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    
    • This is Linus's mainline tree.
    Note: this clones into the current directory. Most of the time you want:
       cg-clone  <URI>||<path> directory
       cg-clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6-linus
      
    to get a copy of Linus's tree into ./linux-2.6-linus

    Note: local gelato users, do cg-clone git://paulaner/home/gelato/linux-2.6-git instead; we have a local mirror that gets updated regularly.
    If you have an old kernel that you want to use the (faster) paulaner mirror, do cg-branch=chg origin git://paulaner/home/gelato.linux-2.6-git

  • Updating the parent repository (branch)
      cg-branch-add <name> <URI>
      cg-branch-add gelato rsync://lemon.gelato.unsw.edu.au:2030/Git/git-linux
    
  • Update an existing repository
      cg-update <branch>
      cg-update gelato
    
  • Undo back to a HEAD, Note this may be wrong, it works for me.

    • The process I take here is as follows:
      1. Find the tag I want to go back to vi cg-log.

      2. Note the commit hash say X.

      3. Search for the string 'parent X', and note respective commit call it Y

      4. Use cg-admin-uncommit Y

    As an example, lets say my current HEAD points to -rc4 and I would like to revert back to -rc3, I would do the following:
    1. The commit of the -rc3 tag is a2755a80f40e5794ddc20e00f781af9d6320fafb

    2. Search for parent a2755a80f40e5794ddc20e00f781af9d6320fafb

    3. Use the commit hash of the search above as input to cg-admin-uncommit, thus the HEAD we want to uncommit to is 858eaca169ed5e7b1b14eebb889323e75a02af0e.

      cg-admin-uncommit <commit>
      # find the required HEAD(commit)
      cg-log | less
      cg-admin-uncommit 858eaca169ed5e7b1b14eebb889323e75a02af0e
      #
    
    • This removed everything including the HEAD, taking me back to -rc3

  • A better way:
    • Use cg-seek

      • Find the tag or ID using cg-log, then do
      •     cg-seek ID
            
      cg-seek on its own does the same as cg-reset (I think).

Please add to this page if you have anything Cogito(Git) to add, I'm lost in a world of HEADS, blobs and objects.

IA64wiki: CogitoHowTo (last edited 2008-02-05 02:20:59 by EtienneLeSueur)

Gelato@UNSW is sponsored by
the University of New South Wales National ICT Australia The Gelato Federation Hewlett-Packard Company Australian Research Council
Please contact us with any questions or comments.