1) Signup for a open source account on github 2) On http://github.com/dantman/jquery.color/tree/master hit the fork button to create your own (git is distributed) 3) Checkout your own private repo after running the config commands github suggests, using `git clone [email protected]:USERNAME/jquery.color.git`. 4) Push changes back to your repo with `git push origin master`
When you make a change to the library you can go back to my repo and use the "pull request" button to poke me to pull our changes into my repo. Likewise I can do the same to poke you to pull my changes into your repo. That second step is key, it's important that people use github's fork option rather than cloning and creating their own empty repo. Doing that makes the repos show up at http://github.com/dantman/jquery.color/network which displays a graph showing all the people who have forked it and the differences between each person's repos. It's good for finding other people's improvements to incorporate too. `git init` is for starting a new empty repo, `git clone` is for starting a new repo based on an existing one (checking it out; it also sets up the remote origin), `git status` tells you the current status of what will be committed and what's changed, `git diff` will tell you the differences between the filesystem's state and what will be committed (NOT the current state of the repo like in svn), `git branch` is for managing branches (these are easier to handle than in svn, so use them freely whenever you are doing something long), `git checkout` switches between branches, `git add` adds changes to the index to be committed (it's not just for adding files), `git rm` removes files, `git stash` can stash changes. And of course `git commit` commits the index. I never bother with `git log`, git-gui can be quite useful and gives you access to gitk and something similar to `git add --patch` which is basically an interactive mode that lets you select only specific chunks of diffs that you want to commit (see http://tomayko.com/writings/the-thing-about-git). Some imporant terms; The index is basically a kind of commit limbo. You `git add` the changes you want to make into the index, and when done use `git commit` to commit those changes as a commit. Your trunk, or active branch is normally "master" Normally you have a remote called "origin" which is normally your own public repo. `git clone` sets whatever repo you clone from as the origin. Something that takes a little getting used to with branches is the filesystem. git basically occupies an absolute single filesystem space. So you create branches with `git branch` and `git checkout somebranch` basically alters the filesystem to become that branch. (On a nix system you may want to use a bash trick to put the name of the current branch into your prompt) ^_^ Fun fact, you can alter the last commit you made. So if you make a typo in your commit message you can fix it before you push it to the repo. You can use `git remote add daniel git://github.com/dantman/jquery.color.git` to make it so that you can `git pull daniel` my changes into your repo. I really like git and the distributed model. It's almost like giving every random person commit access. Dealing with jQuery's svn repo often gives me a number of annoyances. Since I can't commit (even locally) I can't get an easy diff to a previous local version (when I'm dealing with things like two separate changes which depend on one common change). And everything is always stuck in diffs, I can't go and commit anything somewhere and just tell someone to put that change into the main repo. So with git, basically any random person can just clone the repo, commit into it, and publicize their changes publicly so you can pull them back into the main repo without worrying about random people you give commit access breaking it. Not only that but using github you can get a nice view of all the distributed repos and differences. ~Daniel Friesen (Dantman, Nadir-Seen-Fire) Mark Gibson wrote: > Nice one Daniel, I'll check it out when I get time - gonna have to do > a bit of a crash course in git first :) > > 2009/4/2 Daniel Friesen <[email protected]>: > >> I started a GitHub repo: >> http://github.com/dantman/jquery.color/tree/master >> >> I also added full rgb support for alpha values. >> >> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) >> >> Mark Gibson wrote: >> >> Hi Daniel, >> Sorry for the delay, been on holiday. The code seems to be accessible >> at present. I've done a lot of work on it over the last week, so it's >> probably quite different to the last time you looked. I keep meaning >> to start a git hub repo for it, but never get round to it - may have a >> look into it later today after I've cleared my mountain of mail. >> >> http://test3.internal.adaptavist.net/~mgibson/color/ >> >> 2009/3/28 Daniel Friesen <[email protected]>: >> >> >> I was thinking of doing some work on the Color library today but it >> looks like the code isn't accessible anymore. >> >> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
