[Sputnik-list] gitorious (was: proposed versium modifications)
pierre pracht
pierre.pracht at gmail.com
Fri Mar 7 22:55:37 GMT+2 2008
Le 7 mars 08 à 12:21, pierre pracht a écrit :
> Well, need to be used to get an idea.
> If I didn't mistake git usage :
> - if you make a several branch in a network repository, all will be
> pulled when you clone it.
> - if you make several clone, developer may keep a single local git
> repository
> - need to be tested :
> http://www.kernel.org/pub/software/scm/git/docs/git-remote.html
> - not evident at first sight, need to be clearly documented
> - is a good way to go as you would be able to keep master branch
> closed
> - must not be mistaken as a locking, if developer use only local
> branch, nobody can follow their work. Better to publish all work in
> progress.
> - I don't know if gitorious use RESTful, but it would be cool to
> make a script who make a clone on gitorious and a local branch. (and
> more easy a script to bring a clone as a local branch)
>
> That's why I was thinking that a single clone with many branch would
> have been more easy.
> A middle way would be :
> - finish to clean actual git repository
> - make a development clone, and bring every one in it.
> - People making local and shared branch at will.
Sorry for self-answer noise, but it may help to start using git :
----------------------------
# start from mainline repository (read-ony), make branch, push change
from branch to a clone
# initial clone from gitorious :
git clone git://gitorious.org/sputnik/mainline.git
cd mainline
# new branch and go in it
git checkout -b test_versium
# edit file
git add .
git commit -m "first change"
# Clone made on gitoruis named test_versium
# add url in git
git remote add test_versium git at gitorious.org:sputnik/test_versium.git
# push change from branch to master branch of the clone
# git push remote_repro from_local_branch:to_remote_branch
git push test_versium test_versium:master
# Add clone as a branch of copy of mainline
# make local branch and go in it
git checkout -b test_versium
# add url in git here read-ony (can be rw)
git remote add test_versium git://gitorious.org/sputnik/test_versium.git
# take update
# git pull remote_repro from_remote_branch:to_local_branch
git pull test_versium master:test_versium
---------------------------
Previous command work please validate to later document them.
But I didn't manage to store this in configuration file.
git pull work, but not git push
-----------------------------
# in .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git://gitorious.org/sputnik/mainline.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "test_versium"]
url = git at gitorious.org:sputnik/test_versium.git
fetch = master:test_versium #not good
[branch "test_versium"]
remote = test_versium
merge = master
--------------------------
Please test it so we can clone and branch with no fear.
Bonus to who manage to fix configuration
- pierre
More information about the Sputnik-list
mailing list