Hi Mika,

Mika Suomalainen wrote:

> Last time when I needed "git checkout --orphan", it created branch
> without any files.

I'm pretty sure it always had the current semantics.  Perhaps the
index did not contain any files before you ran "git checkout --orphan"
last time?

[...]
> I don't think that a new repository would be good for this, because my
> independ branches are mostly branches, which contain scripts, which
> should be easily accessible in the same repository and are highly
> related to the repository, which contains them.

Sorry for the lack of clarity.  Here is what I mean:

        cd my-repository
        remote_url=$(git config remote.origin.url)

        mkdir Meta
        cd Meta
        git init
        git remote add origin remote.origin.url
        git checkout -b scripts
        vi nice-script
        chmod +x nice-script
        git add nice-script
        git commit
        git push origin scripts

        cd ..
        Meta/nice-script

The result is that the remote repository contains both your code
("master") and scripts ("scripts") and locally you have both available
and do not have to keep switching between them.

The upstream git maintainer does this to maintain a "todo" branch with
scripts and information about the state of different topic branches,
for example.

Hoping that clarifies,
Jonathan


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to