Skip to content

How do I push to a bare repo? #453

@FunMiles

Description

@FunMiles

I've successfully used git subrepo to pull in an existing source code into a subdirectory.
I am now trying for the third time to initiate a git subrepo locally and push it to a bare repository.
Every time I've tried it, it has unfortunately failed.
Would it be possible to get a working example along the line of what I tried?

Here is what I tried the last time:

On the remote server:

mkdir MyRepo
cd MyRepo
git init --bare

On the local:

git subrepo init DirForMyRepo -r git@remote/MyRepo
git subrepo branch  DirForMyRepo
git subrepo push DirForMyRepo -b release/V1

The last command fails with:

git-subrepo: Fetch for push failed: fatal: couldn't find remote ref release/V1
fatal: the remote end hung up unexpectedly

Could someone give me a cookbook recipe on how to successfully do that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions