git refusing to merge branches when pulling using a refspec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm dealing with a small automation (CI) to synchronise some specific branches between two git repositories.

I need to sync a branch with other using a user-given refspec. e.g.

$ git pull origin "refs/heads/branchOrigin:refs/heads/branchDestination”.

(I’ll have a list of refspecs, but so far Im trying to make it work with one)

When the branch can be fast-forwarded there is no problem, but I cannot manage to make it work when it cant.

I just. get the message "[rejected] branchOrigin -> branchDestination (non-fast forward)."

I've tried  the following:
- adding a git config with pull.rebase=false  (I also tried true)
- adding --no-rebase to the pull command  (I also tried —rebase)

In any cases the result is the same

The issue is, It does work if I just pass the branch names. e.g.

git pull origin branchOrigin --no-edit

merges the branch just fine

Im not sure why git refuses to merge the branches when I pass a full refspec. is this intentional? is there some other incantation I need to use to make this work?

Thank you!

Santiago García Pimentel.
santiago@xxxxxxxxxxxxxxxxxx




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux