GIT Status Report
Pavel Pisa
ppisa4lists at pikron.com
Fri Feb 17 13:58:38 UTC 2012
On Thursday 09 February 2012 04:59:19 Ralf Corsepius wrote:
> gs seem to me I need to explictily specify
> "remotes/<repo>/<branch>" in "git checkout -b"'s.
>
> My guess is the cause is my converted gits are still using RTEMS-CVS's
> branch names ("rtems-4-X-branch"), while your gits are using "4.X" as
> branch names.
Hello Ralf,
may it be, that I am late/the second with reply but I think,
that you want to use branches a way, they are not supposed to work.
There are two types of branches in your repository.
The branches which reflect state of the external "World" i.e.
remotes/origin/master
remotes/origin/4.10
...
remotes/ralf/master
...
and your local branches reflection your inner world i.e.
master
4.10-bufixes
send-to-joel
...
You can use some graphical tools to navigate through versions.
I like most of all qgit when GNU/Linux host is used for development.
You can checkout any version of code if you want to examine
sources as well i.e.
git checkout master
git checkout remotes/origin/4.10
git checkout remotes/ralf/master
git checkout 0ae9ee1da48d7deab49e42aa789ba02de8501047
git checkout rtems-4-9-2
But you could not modify directly whole world. You can work only
with your inner world. I.e. branch local branch "master" after
initial clone. You should not attempt to other remote branches.
If you want to contribute to another branch, you need to
create you inner world copy of the branch. I.e.
git checkout --track -b 4.10-fixes origin/4.10
or simple
git checkout -b 4.10 origin/4.10
This creates your local branch 4.10-fixes where you accumulate
your commits. The --track option defines that your local branch
4.10-fixes should should suck remote branch changes.
I.e. "git pull" (when "git checkout 4.10-fixes" is last actual branch)
would know that it should ask to update local view of "origin"
repository ant then proceed "git merge origin/4.10" automatically.
If you "git commit" to your 4.10-fixes then you can send suggested
changes "git send-email" or directly push them into repo.
I.e.
git push origin
git push origin 4.10-fixes:4.10
If your the changes (branch state) is not direct descendant of the actual
remote branch commit then you need to use --force option and non fast forward
has to be allowed at remote repository. You can overcome that sometimes
by deleting remote branch
git push origin :4.10
and recreating it afterward
git push origin 4.10-fixes:4.10
If you want to collect changes from more repositories you add another remote
git remote add joel git://git.rtems.org/joel/rtems.git
git checkout 4.10-fixes
git merge joel/4.10
git push origin 4.10-fixes:4.10
git push ralf 4.10-fixes:4.10
git push joel 4.10-fixes:4.10 (if you have a right to do that)
I suggest to look at great explanatory slides with git development
process "animations" form Bart Trojanowski. Static version
http://www.jukie.net/~bart/slides/intro-to-git/intro-to-git.pdf
Actual version
git clone git://git.jukie.net/intro-to-git.git/
cd intro-to-git
make
kpdf intro-to-git.pdf
So I hope that this is helpfull and not wste of your time.
Best wishes,
Pavel
More information about the users
mailing list