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 (PeterChubb) am also adding stuff on other source-code-management systems at SourceCodeManagement, including SourceCodeManagement/Git and SourceCodemanagement/Mercurial)
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.
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-linusNote: 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:
Find the tag I want to go back to vi cg-log.
Note the commit hash say X.
Search for the string 'parent X', and note respective commit call it Y
Use cg-admin-uncommit Y
The commit of the -rc3 tag is a2755a80f40e5794ddc20e00f781af9d6320fafb
Search for parent a2755a80f40e5794ddc20e00f781af9d6320fafb
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
- The process I take here is as follows:
- A better way:
Use cg-seek
- Find the tag or ID using cg-log, then do
cg-seek ID
Please add to this page if you have anything Cogito(Git) to add, I'm lost in a world of HEADS, blobs and objects.
