lab icon indicating copy to clipboard operation
lab copied to clipboard

lab mr create does not work with custom remote name for fork

Open LaneWolf opened this issue 4 years ago • 1 comments

Setup local repo for project and it's fork using following commands:

lab clone cd lab fork -r -n git checkout -b

After commiting changes and pushing mybranch to myremote (git push ), try to create mr (lab mr create). It fails with following error:

mr_create.go:148: aborting MR, source branch not present on remote origin. did you forget to push?: GET https://gitlab.com/api/v4/projects/<project_id>/repository/commits/: 404 {message: 404 Commit Not Found}

After renaming remote to default value (username), lab mr create succeed.

LaneWolf avatar Apr 22 '21 09:04 LaneWolf

What command did you use to do the push? You should use 'git push -u' to set upstream.

For example,


git checkout <target branch name>
git checkout -b <branch_name>
# do work
git push -u <fork_name> <branch_name>
lab mr create  <origin> <target branch name>

prarit avatar Apr 22 '21 12:04 prarit