[oe] ETA on git conversion

Jonas Bonn jonas.bonn at gmail.com
Tue Oct 14 14:41:26 UTC 2008


>> git clone git://git.openembedded.net/FIXME openembedded.git
>
> Does it need to create openembedded.git as the directory name rather
> than just openembedded?

Convention is to use the .git extension for "bare" repositories and
not for a working directory as you would be creating with git-clone.
If you clone from an xxx.git repository, the working directory will be
called just "xxx" if you don't specify anything else.

>
>> git config user.name "Your Name"
>> git config user.mail "you at name"
>
> Do we want to use the --global flag so that the scope of these commands
> covers all git repos for that user and they don't forget to do it for
> every new repo they clone?

Yes, this is a good idea, in my opinion.

>
>> git commit --amend
>
> Add a comment that this should only be done on commits that have not
> been pushed anywhere, and should *never* be done on commits that have
> been pushed to a public repo?
>

I imagine the public repo is set up to only allow fast-forwards... in
this case the user won't be able to push at all if they do an --amend
on commit that's already in the repository.

>>       ( git clone git://git.openembedded.net/org.openembedded.dev openembedded ; \
>>         cd openembedded ; \
>>         git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*' )

No, this doesn't look right...  you should not be fetching the
"remote" repository's remotes.  You should only be grabbing the
"heads" from the remote repo.  But maybe you had a reason for doing
this...???
Otherwise, the following is the usual mantra:
git config --add remote.origin.fetch '+refs/heads/*:refs/remotes/*'
...but this is also the default that git-clone sets up fpr you, so no
need to do it explicitly.

>>       ( cd openembedded && \
>>         ( git branch | egrep -e ' org.openembedded.dev$$' > /dev/null || \
>>           git checkout -b org.openembedded.dev --track origin/org.openembedded.dev ))
>>       ( cd openembedded && git checkout org.openembedded.dev )
>>       touch openembedded/.git/config
>

/Jonas




More information about the Openembedded-devel mailing list