portage sources have moved from SVN to GIT
On 03/24/10 09:07, Zac Medico wrote:
> If you have push access then you can commit something to the master
> branch like this:
> git clone git+ssh://firstname.lastname@example.org/proj/portage.git
> cd portage
> # edit files
> git commit -a
> git push origin master
Let me add a few more words and pointers: let me get you started.
In this mail
- First thing to do
- On "origin"
- Not like Subversion: Commits in Git
- Committing versus pushing
- Non-linear history
- Commits and the staging area
- You in the future
- Resources (lots of recommendable ones)
First thing to do
After cloning you need to set up your commit identity:
git config --global user.name 'Dr. First Middle Last'
git config --global user.email 'email@example.com'
Missing that up front is more work later.
The "origin" Zac mentioned is the name of a remote - a URI Git can pull
from and (sometimes even) push to. Soon you will work with more than
one remote: From personal experience I recommend to rename that remote
to something more meaningful, something reflecting the involved host at
git remote rename origin overlays-gentoo-org
Not like Subversion: Commits in Git
Committing versus pushing
In Git you commit locally, even without network connectivity.
You do a few local commits and push them to the server in an extra step:
git push overlays-gentoo-org master
In the beginning this separation may feel like a burden.
You'll soon appreciate to have it.
Commits and the staging area
When you do
the content of the staging area (called "index" sometimes) is written
into a new commit object.
So modifying the staging area you change what goes into the next commit.
git add file3.txt
git add -u
git add -p
do changes in the index for you.
The index is one of the core features and differences to other systems
including Subversion. Understanding the index is essential to working
with Git. Please study online material on that topic.
Due to its distributed nature
- history is a directed acyclic graph (DAG) in Git, not a list
- revision IDs are SHA1s, not plain numbers
I can recommend emerging dev-vcs/gitg for a visual history browser.
Present is on top, moving down is moving into the past
You in the future
Now that we're on Git you'll soon be able (and expected) to
past commits, i.e. re-write history. The related commands are
git commit --amend
git rebase -i
See here if you want to know more:
Resources (lots of recommendable ones)
Video Talks on Git
- (2007-05-03) Linus Torvalds
"Source code control the way it was meant to be!"
- (2007-10-12) Randal Schwartz
- (2008-06-01) Scott Chacon
- (2008-07-09) Tommi Virtanen
"Version Control for Developers"
- (2008-07-09) Bart Trojanowski
"Git the basics"
- (2008-10-27) Johannes Schindelin
"Contributing with Git"
- Git Magic
- The Git Community Book
- Git from the bottom up
- The Git Parable
- Pro Git
- Git Ready
- Git Casts (actually short films)
- Git FAQ
- Check #git on Freenode <-- very helpful
- Mail me
- Call me: +49 177 / 460 46 17
Thanks for reading!