1. Toan Nguyen
  2. PowerBuilder
  3. Wednesday, 12 April 2023 03:19 AM UTC

Hello,

I am using PB2019R3 and in the IDE, the modified source code that was 'git clone' from the branch (non-master) level was successfully 'Git Commit'.

However, when I try to do a 'Git Push' in the IDE, I received the following error: "Cannot push non-fastforwardable reference".

I can use TortoiseGit to do commit/push with no problem outside of the PB IDE. I thought with PB2019, we can directly do commit/push at the branch level inside the IDE.

Hope someone can tell me what I am doing wrong.

Thanks in advance,

Tony Nguyen

 

Toan Nguyen Accepted Answer Pending Moderation
  1. Thursday, 13 April 2023 14:33 PM UTC
  2. PowerBuilder
  3. # 1

Thank you everyone for your responses to help me resolving my issue.

After spending so much time trying to take advantage of the PB2019's new Git Source Control feature to use Git at the branch level in the PB IDE environment without success, I am going back to TortoiseGit which I have been using without issues.

Thanks again!

Tony

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 14 April 2023 00:34 AM UTC
Hi Tony, As Andreas mentioned, we have kept working on improving Git feature in each major version. Please try PB 2022 you might be surprised in a good way.
  1. Helpful
There are no comments made yet.
kitty he @Appeon Accepted Answer Pending Moderation
  1. Thursday, 13 April 2023 04:52 AM UTC
  2. PowerBuilder
  3. # 2

Hi Tony,

 

The prompt message means that the code on the server has new commits. You need to do a Git pull first. You may have a conflict in pulling (it's hard to discover a PBL conflict).

Does the issue happen occasionally or every time?

 

BTW, PB 2022 does not commit PBLs by default to the repository, which mitigates troubles caused by PBL conflicts.

 

Regards,

Kitty

Comment
  1. Andreas Mykonios
  2. Thursday, 13 April 2023 05:57 AM UTC
Hi.

It's not that hard. But PB IDE hasn't any option to do that. Whenever a push fails from PB IDE, I try push using TotroiseGit to see where is the problem. Whatever is the issue it will be reported.

By the way, PB 2022 is far better in Git support. Appeon did some good improvements.

Andreas.
  1. Helpful
There are no comments made yet.
Toan Nguyen Accepted Answer Pending Moderation
  1. Wednesday, 12 April 2023 19:47 PM UTC
  2. PowerBuilder
  3. # 3

Hi Benjamin and Andreas,

Thanks for responding to my question.

I checked and confirmed that the branch is not remote.

I attached the screenshots of the steps that was taken to do Git Commit/Push for my modified object in the PB2019 IDE.

Hopefully, someone can review and see my error.

Thanks again!

Tony

Attachments (1)
Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 12 April 2023 13:10 PM UTC
  2. PowerBuilder
  3. # 4

Hi.

Are you aware of the following?

If you switch to a remote branch (in most cases the one starting with "origin/"), you will not be able to commit changes to the remote branch.

Are you sure you aren't trying to commit to the remote branch?

Andreas.

Comment
There are no comments made yet.
Toan Nguyen Accepted Answer Pending Moderation
  1. Wednesday, 12 April 2023 12:47 PM UTC
  2. PowerBuilder
  3. # 5

Hi Benjamin,

Thanks for responding to my question.

I am the only developer working on this project. In our project, all source code modifications are done at the branch level. We only merge to master branch when the development is completed and tested to do a build on the CI pipeline.

I used TortoiseGit to do commit/push when our applications were using PB2017. With migrating to PB2019, knowing the Git source control enhancement, I was trying this new feature but not successful.

Inside the IDE, the Git Commit on the modified object for the branch was successful. However, when trying to do Git Push, i got the following errors:

Git detail error info: Cannot push because a reference that you are trying to update on the remote contains commits that are not present locally.

Git client error code: Reference was not fast-forwardable. Please execute Git Pull to merge remote changes into your local repository before trying again.

Failed to push workspace.

 

I am not sure what I am doing wrong.

Thanks again!

Tony

 

 

Comment
  1. Benjamin Gaesslein
  2. Wednesday, 12 April 2023 13:45 PM UTC
Check your local git log and compare it to the remote log. If the last commit hash on both is not the same, you cannot push without forcing it.
  1. Helpful 1
  1. Benjamin Gaesslein
  2. Thursday, 13 April 2023 05:37 AM UTC
Addendum: my last comment was inaccurate; what I meant was that the last commit hash on the remote repo has to be part of the local history.
  1. Helpful
There are no comments made yet.
Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Wednesday, 12 April 2023 12:20 PM UTC
  2. PowerBuilder
  3. # 6

Hi Tony,

the error message indicates that the remote branch cannot be updated because it differs from the local branch. Most likely someone else has pushed commits to the repository that you do not have locally. This will always happen in that case. Does everyone push directly to the main/master branch?

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.