Github for Windows Pull Request for remote Bitbucket Repo - github-for-windows

Based on this tutorial I was able to successfully connect Github for Desktop with my remote Bitbucket repo.
Looking at the example tutorial repo I see there is an Pull Request option built in the application - great:
However the option is missing when I chose my remote Bitbucket repo:
I couldn't find any option that is reponsible for this.
Anyone knows what affects this behavior?

"Pull Request" is very much a GitHub feature, associated to GitHub repos.
So For BitBucket, the simplest approach is to push your feature branch to the remote repo (which is a BitBucket one, not a GitHub one), and make your PR from there (from the remote BitBucket web GUI, even within the same repo)
Once the PR is initiated, each push done from the GitHub Desktop will complete said PR.

In Bitbucket go to Settings -> Branch Permissions, and add a new branch permission with your name.
EDIT
https://stackoverflow.com/a/37343356/1544886

Related

Why does adding a repository in GitHub Desktop locally not show my pull requests

So I have a GitHub Enterprise account. On GitHub Desktop when I clone my repository from the server it goes under Enterprise and I can see the list of branches and Pull requests as shown below.
If I simply add an existing repository from my local machine onto GitHub Desktop, then it goes under Other and now I can't see the option for showing me my pull requests.
I don't want to have to reclone all my repo because that just seems silly but is there a way I can still see if there's any pull request from my repo that I simply added in from my local machine?

Github Desktop says my own local branch is "a protected branch" and I can not commit to it. How do I remove this protection?

I forked a Project on GitHub and then opened my fork in GitHub Desktop (Windows 7). Locally, I created a branch and made changes to the code. Now I want to commit the changes, then publish the branch to my fork on GitHub, and then make a pull request to the original repo. That is how it used to work the last time I did this.
But now GitHub Desktop unasked protects this branch ("branch is a protected branch. Want to switch branches?"), and I can not commit things to it. On GitHub, in the settings of my fork, under "Manage Access", it says:
0 collaborators have access to this repository. Only you can
contribute to this repository.
But I can not do this (contribute to this repository).
How can I "unprotect" that branch and commit to it?
The solution was to first push the fresh branch without the commits to my fork at GitHub. After that the protection in GitHub Desktop disappeared, and I was able to locally commit changes to that branch and push them online.
I had to log off and log in once from within GitHub Desktop, to be able to push the branch, for security considerations, I had not logged in via Desktop for a while.

Can we create a pull request using command-line tooling?

As my browser was crashing I was not able to create a pull request from GitHub UI, I was trying to create a pull request from git console but didn't found any way to create a pull request.
I have also searched for the same over the net but most of the tutorials suggested to create a pull request from UIs only. I just want to be able to handle the pull request like creation, rejection, approved and merging without the browser. Please suggest.
git and github are separate products. github is a service that happens to use git, but it is not part of git, its UI is not a git interface, and git does not have any special support for github functionality.
There is a little potential confusion here, because there are "pull requests" - an integrated feature of github having to do with branch workflow - and there is git request-pull, a seemingly lesser-known feature of git which creates a text message you could send to another repository maintainer to request that they pull changes from your repository.
Naming confusion aside, the "pull request" you want is a feature of github, not git; and so git itself (including git console and any git UI tool) have no command for this. You have to use a github-supplied interface, and AFAIK that means the web UI.
To open a pull request from the command line, you can install the hub set of command-line tools that GitHub supports. This will allow you to create a pull request from a repository with:
hub pull-request
I'm not aware of any similar tools for managing pull requests, though.
git add -p
then
git commit -m "message"
then
git push origin "your_branch"
the pull request will be created in github

Can't checkout remote branch using GitHub Desktop

When I first clone a repo using GitHub Desktop (windows version), I'm able to see all of the branches and can checkout the branches.
However, if another contributor creates a new remote branch (after I've done the clone), GitHub Desktop isn't able to fetch and checkout the new branches. The branches are visible via the GitHub website. The only way I've found to checkout these branches via GitHub desktop is to delete the local repo and clone again. I was expecting the "Sync" button to handle fetching new branches from the remote repo.
Any ideas?
According to Steve Ward at GitHub Support:
You should be able to hit F5 in GitHub Desktop to refresh the repository and fetch any new branches from the remote repository. There currently aren't any animations for this process, but it should work without issue. [...] we automatically fetch new branches every five minutes as well.
You can also click on the "Gear" button in upper right of the client, select "Open in Git Shell" and type the command git fetch in the command window that is opened...

Export mercurial local repo to GitHub/Bitbucket

I have a local mercurial repo on my desk, and I want to upload it to bitbucket, or github, so it can be viewed on the web.
So far I am stucked at the import phase, both GitHub or Bitbucket request that I provide an URL for my repo (i'd have prefer a simple path on my disk, to the repo).
I've started a local server but then the address:
http://localhost:8000/Myrepo/
failed to be acceded.
I know about the tortoiseHg Hg-Git plugin and I tried to make a push git://... but it failed too.
So my first question is: how to I put my mercurial repo on the web so it can be imported ?
My second question is: what's the point of having a bitbucket / github account if I have to set an online, public, mercurial server on the web to push to them ?
What I would like is to continue to work locally, then push to bitbucket / github, without having to set up a mercurial server.
Thanks
Problem: You have an existing local (mercurial or git) repo and want to transfer it to bitbucket
Short answer:
Create a new empty(!) repository in bitbucket
Copy the bitbucket URL of the new empty repo
Push your existing old repo to the address of the new bitbucket repo
Now the bitbucket repo is overwritten with the history of your existing (old) repo.
I just tested it and it worked perfectly :-)
The detailed answer to your Problem is explained here:
https://confluence.atlassian.com/bitbucket/push-versioned-code-to-an-empty-repository-877177145.html