Unable to Merge - bitbucket

As regular user of bitbucket never face this problem before. Created Pull Request in regular way and when trying to merge it throws error without any details about reasons. Tried for several days with gap in between and also tried in different timing. What will be the reason and how to solve it.

Since you don't know any details about the error, just merge your branches in your command line:
git merge my-feature-branch
git push --all
(run this in the branch where you want my-feature-branch to be merged)
Also, if you consider so, you can always open an issue here.

For future reference, it also works when we open bitbucket instance in incognito.

Related

Trying to fix merge conflict by rebasing, change X closed

I am currently trying to fix some merge conflicts that are coming up in Gerrit. I've tried to rebase and submit my commits manually from Gerrit, but it hasn't been working out. What I'm trying to do now is follow this guide to rebase in order to fix the merge conflicts. Once I've manually fixed the merge conflicts in VScode, I try to push temp-branch with git push origin HEAD:refs/for/master. It gets rejected with this message:
! [remote rejected] HEAD -> refs/for/master (change <link to B> closed)
4e6b4ca (HEAD -> temp-branch) A
97bf4ds B
5392gsa (origin/master, origin/HEAD, master) C
...
17sfv2t B
I'm assuming this problem is due to the fact that 17sfv2t B has already been merged, but I'm not too sure. This is my first time with the rebasing process/Gerrit, so I might have missed some important details. Any help on this issue would be greatly appreciated!
Yes, you're right, the problem is due to the fact that the change with commit B is closed.
To solve this issue, first of all, you need to clarify why your "git log" has two B commits (97bf4ds a 17sfv2t) and how is possible to have a commit with a non-hexadecimal hash (17sfv2t), this is really weird.
It seems that the issue is related to commit 97bf4ds. Probably this commit has (by mistake) a Change-Id (a line in the commit description like, for example, "Change-Id: I0ff3092b7970f354df98c81a7d53f60ca826a55c") which is related to the closed change in Gerrit. Is this commit done by you? Why this commit has a Change-Id from a closed change?
Probably all you need to do is fix this Change-Id (using the "git rebase -i" command) before pushing the commits to Gerrit, but it's impossible to know for sure because you didnĀ“t specify exactly what are you doing and what commands have you exactly executed to get in this situation.

Updating JIRA issues from gitlab pipeline

I want to move an issue to the deployed stage (transition) when the gitlab pipeline of a merge request has finished. Is that even possible?
My Idea so far:
The pipeline is related to that specific issue by both the branch name (see 1.) of the merge request and also the message of that merge request like so "Finish PV-1234".
I can parse the issue key from the branch name.
I can call a server to run a script making the Jira api call.
If you directly want to close the issu, look into the gitlab jira integration docs - therefore you have to add a description to your MR, to tell the integration to close the issue, as soon as the MR was merged.
If you want more control, write yourself a simple script, that first gets the ids of the available transition (You can get them via /rest/api/3/issue/{issueIdOrKey}/transitions see here) and after that posts the transition you want (You can do that by posting on the same endpoint, as the get command mentioned before see here).
Sad that the jira integration doesn't provide more issue-movement than jsut closing issues...

Bitbucket credentials issue in source tree and git

I am not sure if this is the correct place for this. I used source tree to clone a bit bucket repo and was able to do it a couple of months ago. I was also able to push and pull. However, recently when I try to push and pull or even clone down another copy using the same credentials i get an invalid credentials message.
I have tried clearing out the windows credential manager, resetting my atlassian password, and trying to clone on a completely different computer with the same result.
It's weird because I can add my bitbucket account to source tree using the username and password but I cannot clone, pull, or push using those same credentials.
I do not have an errors message screenshot but could get one if the issue is not clear.
Thanks!
Update: Here is an interesting behavior happening out of sourcetree, when I try to clone a repo I get multiple login prompts. All of these fail when using the credentials.
It appears that the newest version of source tree has a few issues to work out. Downgrading to an older version, 1.9 I believe, I was able to perform cloneing, pulling, and pushing without issue.
I decided to look for alternative clients but source tree would still work on an older version.

Setting up vimdiff as the mergetool for fossil

I have spent quite a bit of time looking for pointers or ways to set this up. I've used git at my previous job and my new job is using fossil. I'm a novice vim/vimdiff user and would like to keep using it as my daily driver.
I'm having a hard time figuring out how to setup vimdiff as my merge tool. Essentially I need to setup my gmerge-command to use vim diff. I found this:
https://www.fossil-scm.org/xfer/help?cmd=gmerge-command
But not sure how to proceed with vimdiff. I found a ton of help to do this with git but nothing to setup with fossil. Has anyone used vimdiff as the mergetool for fossil?
Thank you!!!
I haven't (using KDiff3, personally). But if you know what command line to use with Git, then you should be using the same commands with fossil.
Keep in mind that Fossil has two separate settings, gdiff-command and gmerge-command.
The gdiff-command is executed whenever you run the fossil gdiff command. The gmerge-command command is executed whenever Fossil needs to perform a merge (e.g. when it encounters a conflict during a merge operation). It will replace the placeholders (indicated on the documentation page you referred to) %baseline, %original, %merge and %output by the relevant file names.
If vimdiff is capable of performing a three-way merge, it should be possible to specify those file names as well.
Looking at these instructions for using Vim to perform merges in Mercurial, I'd suggest you simply try setting your gmerge-command to vim -d "%baseline" "%original" "%merge" "%output" +close +close.

BitBucket Cloud: Enable Auto Fork Sync

How can I enable auto fork syncing on BitBucket cloud ? I cant find the option and have to manually keep the fork updated.
Thanks!
While originally I found this article, it seems this only applies to their server product: https://confluence.atlassian.com/bitbucketserver/keeping-forks-synchronized-776639961.html
This article indicates that its a process you will need to manage manually on local:
https://confluence.atlassian.com/bitbucket/forking-a-repository-221449527.html
After you fork a repository, the original repository is likely to continue to evolve as other users commit changes to it. These changes do not appear in your fork. However, you can pull these changes into your fork later by syncing changes locally from the command line.
While this describes pulling upstream manually, you could probably script something to do this more automatically for your purposes. If I end up doing something like this for our team, I'll update this answer with more details or perhaps someone else will do the same.

Resources