Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Portage Developer (http://www.linux-archive.org/gentoo-portage-developer/)
-   -   portage sources have moved from SVN to GIT (http://www.linux-archive.org/gentoo-portage-developer/346160-portage-sources-have-moved-svn-git.html)

Zac Medico 03-24-2010 07:07 AM

portage sources have moved from SVN to GIT
 
Hi,

As the subject says, the portage sources have been moved from SVN to
GIT [1]. The new repo is located on git.overlays.gentoo.org [2].
I've just updated the documentation to reflect this move [3] and it
will be a few minutes before the html regenerates.

If you have push access then you can commit something to the master
branch like this:

git clone git+ssh://git@git.overlays.gentoo.org/proj/portage.git
cd portage
# edit files
git commit -a
git push origin master

[1] https://bugs.gentoo.org/show_bug.cgi?id=196025
[2] http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=summary
[3] http://www.gentoo.org/proj/en/portage/doc/testing.xml
--
Thanks,
Zac

Sebastian Pipping 03-24-2010 11:55 PM

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://git@git.overlays.gentoo.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)

- Questions?


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 'nick@gentoo.org'

Missing that up front is more work later.


On "origin"
===========
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
best, e.g.

git remote rename origin overlays-gentoo-org
^old ^new


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 commit
git commit
..
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

git commit

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.
Commands like

git add file3.txt
git add -u
git add -p
git reset

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.


Non-linear history
------------------
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

re-order
merge
split
clean-up

past commits, i.e. re-write history. The related commands are

git commit --amend

and

git rebase -i

See here if you want to know more:
http://book.git-scm.com/4_interactive_rebasing.html


Resources (lots of recommendable ones)
=======================================

Video Talks on Git
------------------
- (2007-05-03) Linus Torvalds
"Source code control the way it was meant to be!"
http://www.youtube.com/watch?v=4XpnKHJAok8

- (2007-10-12) Randal Schwartz
"Git"
http://www.youtube.com/watch?v=8dhZ9BXQgc4

- (2008-06-01) Scott Chacon
"Getting Git"
http://www.markrichman.com/2008/06/14/railsconf-git-talk/
http://www.vimeo.com/1099027?pg=embed&sec=1099027

- (2008-07-09) Tommi Virtanen
"Version Control for Developers"
http://blip.tv/file/1114793/

- (2008-07-09) Bart Trojanowski
"Git the basics"
http://excess.org/article/2008/07/ogre-git-tutorial/

- (2008-10-27) Johannes Schindelin
"Contributing with Git"
http://www.youtube.com/watch?v=j45cs5_nY2k


Online Reading
--------------

Introductions
`````````````
- Git Magic
http://www-cs-students.stanford.edu/~blynn/gitmagic/

- The Git Community Book
http://book.git-scm.com/

- Git from the bottom up
http://ftp.newartisans.com/pub/git.from.bottom.up.pdf

- The Git Parable
http://tom.preston-werner.com/2009/05/19/the-git-parable.html

- Pro Git
http://progit.org/book/


Task-oriented material
``````````````````````
- Git Ready
http://gitready.com/

- Git Casts (actually short films)
http://gitcasts.com/

- Git FAQ
https://git.wiki.kernel.org/index.php/GitFaq


Questions?
==========
- Check #git on Freenode <-- very helpful
- Mail me
- Call me: +49 177 / 460 46 17


Thanks for reading!



Sebastian Pipping


All times are GMT. The time now is 09:55 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.