Git tips

From OLPC
Revision as of 12:42, 26 July 2007 by 82.56.49.81 (talk)
Jump to navigation Jump to search

Create a remote branch

git clone git+ssh://dev.laptop.org/git/sugar
git branch trial-2
git push origin trial-2

Work on a remote branch

git clone git+ssh://dev.laptop.org/git/sugar
git checkout -b trial-2

Add the following to .git/config

[branch "trial-2"]
    remote = origin
    merge = refs/heads/trial-2

Then checkout the branch and pull:

git checkout -b trial-2
git pull

You can now use commit, push and pull as usual.