Pull request from feature branch to master, disappears - bitbucket-server

We are experiencing following issue while merging the pull request in our Stash repo.
Scenario:
- Developer creates a feature branch from existing "master/Dev" and submits a pull request to reviewer
- Reviewer, checks and accepts by clicking on "Merge"
- Merge goes through successfully with a new "Commit ID" on Master branch, but within couple of minutes the "Commit ID" on "Master branch" disappears (See Attached images).
- When I do it the other way (Pull request from Master to feature branch) everything works fine.
- I even tried disabling all my "SVN hooks" and I still see the issue. Even the "daemon.0.log" shows nothing.
- I am pretty sure this exception is caused by Subgit. When I shutdown the mirror I see no issues.
Can you please help us resolve the issue.
Thanks,
smandadi

Apparently, Stash recommends using "SVN mirror plugin" (Dev by Atalassian + Subgit group) over Subgit tool. Looks like the tool has some glitches while working with Atlassian Stash.
Solution:
1. When using Stash, please use "SVM mirror Plugin" instead of subgit.
2. If you have your system already setup with Subgit + Stash, then just download "SVN mirror plugin" and enable it.
(Please refer to issues.tmatesoft.com/issue/SG-100 for more info.)
Thanks Semyon for the help.

Related

STS getting this while pull/fetch latest changes Couldn't lock local tracking ref for update

Getting this issue in spring tool suit while fetching/pull latest changes from remote branch. i don't have git bash on my local previously it was working fine right now i am getting below mention issue.
Couldn't lock local tracking ref for update
I also encountered same problem
But I removed this problem using GITHUB Desktop tool.
Once I executed pull from STS, its showed the dialog box with error as shown above. and a up arrow got appended showing there are some commit to be pushed,
though I had not made any commits before this pull. The changes from pull were not added to my local project.
I checked on Github Desktop, and it also showed same arrow.
I pushed it from tool, and it was resolved. The changes from pull got added to local project.
While you don't have git bash, Eclipse is using its own JGit (java-based implementation of Git)
As recommended in "egit lock fail eclipse", do check if you have any "<refname>.lock" file under .git/refs/". (howlger refers to eclipse issue 417860:
I checked in jgit and egit sources and found that the only occurrence of the text "[lock fail]" is used when fetch fails to update a remote tracking branch.
This can happen if a previous crash didn't cleanup a "<refname>.lock" file which git creates as a lock to guard the ref against concurrent updates.
git remote prune origin
solved same problem for me

Multibranch pipeline job not showing open pull requests

I have configured a multibranch pipeline job in Jenkins linked to our GitHub repo which is working nicely, feeding back the status of checks to the pull request in our GitHub so we know if the branch is good for merging in.
What I don't see are any open pull requests listed against the Job in Jenkins:
We also have the Blue Ocean plugin in installed and no PR's are shown there either.
Anyone know why this is the case? Am I missing another plugin\config?
I had this issue as well. I tried what joey suggested, but that did not work. I found out that if you add PR-.+ (or PR-* as a wildcard) to your regex filter for branches to include, the pull requests "magically" appear. The documentation of this was found here. It's very frustrating that the "official" documentation for this plugin does not explain this (at least from what sparse documentation I could find). The configuration for my project, which works, is here:
I'm not sure if this is a recommended way to use this plugin for this use case, but Jenkins never seems to have ample documentation.
I was getting the same issue. But this time within Blue Ocean UI as shown below
The fix was to switch from using Git to GitHub Branch Source at the job level and configure GitHub Branch Source. The job type was Multibranch pipeline.
One possible cause could be that GitHub is unable to connect to Jenkins directly due to a firewall. This is likely the case if GitHub never reports the status check as completed, in other words, it hangs forever.
In this case, polling is an easy solution. Go to http://_jenkins_ip_:8080/job/_job_name_/configure and select the "Scan Repository Triggers" tab. Tick the "Periodically if not otherwise run" checkbox and select an interval. I have 15 minutes on mine.
The first time this is done, there should be an immediate scan and it should detect the pull request, otherwise, there might be something else going on. Check the "Scan Repository Log" page on the job, as it might have useful info.
By the way, I did not install the "GitHub Pull Request Builder Plugin" as the page says that it has a security issue. Instead, the "GitHub Branch Source Plugin" is being used. Some other related plugins installed:
Git client plugin
Git plugin
GitHub API Plugin
GitHub Authentication plugin
GitHub Integration Plugin
GitHub plugin
I'm also using Blue Ocean, but this is not required, it simply provides a different UI.
I know that this is an old topic, but I had the same issue while I was trying to visualize my Pull Requests from Bitbucket and I hope this answer will help other people in need. In my case, I was using Bitbucket Push and Pull Request Plugin, which is pretty similar to other GitHub Plugins for Jenkins.
My problem came from the fact that I selected Git instead of Bitbucket in Branch Sources >> Add Source section. I suspect the same thing happened in this case, where the two options Git and GitHub are even easier to confuse.

Eclipse-fetch says my Git repo is current so what's the ↓13 mean?

As a git noob, Eclipse is not helping my confusion... I switched to me local master branch and ran a fetch with the settings below:
Firstly I don't understand why the "Next" button is disabled. Secondly when I run the fetch using "Finish", it tells me I am already up to date (makes sense as I already fetched). So what does the ↓13 mean? Isn't it telling me my local branch is behind the remote branch? Or that the remote branch is itself behind... but this is the remote master so what can it be behind of?
It means that you are 13 commits behind the origin.
If the arrow is pointing up, that means that your branch is X commits ahead of the origin.
As far as your Next button being grayed out. I believe it's because you havn't selected the Ref yet. Click the ref, and then you should see it.
FYI - when i started out with Git, i tried to use the eGit plugin for Eclipse, and I can say to you as a new person in Git. Use command line! I've had my local git repositories corrupted from the plugins, and it's not very intuitive.

EGIT rejected non-fast forward

I'm on Eclipse 4.2.1 (Java) and trying to use EGIT. My account is all set up on Github. No one else is working on it so there are no changes. I have a very simply project containing a single file with one print statement.
I created my local repo and added the project. (project explorer shows: [gitrepo1 master])
In project explorer:
right click on project -> team -> remote -> push
But I get: master: HEAD [rejected - non-fast-forward]
I've configured the push:
Branch -> master
URI -> ssh.git#github....
Ref mappings -> HEAD:/refs/heads/master
What am I doing wrong?
We had this problem, because we amended a commit after pushing it.
The solution was to merge origin/master (in Branches > Remote tracking), then push.
egit works by using jgit which is an implementation of git that is using java. the best thing to do is verify that the repo works with the normal git client. From your question it is not possible to know exactly how things ore configured.
When you get the error message that you could not do a push because it is not a fast forward, it means you need to do a pull first then, do the push, so try that.
Same cause as Bernát: I amended a commit after pushing it. Merge failed because of conflicts.
My way out: Context menu 'Team/Reset' selection 'Remote Tracking'/'origin master' option 'Mixed'. After that all my changes since last push were marked and I could commit and push.

Eclipse EGIT - all committed, pulled, merged, marked as merged, still on push I get "rejected - non-fast forward", what am I missing?

I'm starting to experiment with Git, and I'm sure I'm missing something, as I can't do a simple merge and push
Here is what I do (I probably got it in the wrong order, or wrong in any order, please correct if it is)
pull
Syncronize Workspace
on conflicts - did a manual merge,
then "Mark as Merged" (is it necessary?)
on the rest - allowed the automatic merge
commit my changes
pressed push (origin-master)
I get the famous "rejected - non-fast forward"
did a "fetch" to check - nothing to update
did another commit - nothing to commit
What am I missing?
Not sure if it's relevant but I'm using Windows 7, EGit (1.3.0.201202151440-1) in Eclipse Indigo (SR2, build 20120216-1857) and pushing to GitHub
I think I found it, instead of "Mark as Merged", I need to do "Add"
Manual conflict resolution
To resolve a conflict you have to do the following steps:
Navigate to the conflicting resource Edit the content of the conflicting resource Tell EGit that the conflict is resolved with Team -> Add
Commit the conflict resolution with Team > Commit
from http://wiki.eclipse.org/EGit/User_Guide#Manual_conflict_resolution
Edit: apparently, I should have learned git command line before playing with EGit, same concept there