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

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?

Related

How do I mirror Github page for local browsing?

Let's say I have an internal web server (nginx) and I want it to serve a page with the content of the GITHUB repository, e.g. https://github.com/vibranze/test. Page from the repository must be served locally.
I've tried the article from https://help.github.com/articles/duplicating-a-repository/ but the synced repository is not browseable due to no index file.
How do I make the local repo browseable internally and looks exactly the same like what its master copy in github.com or if I've done it wrongly, what's the correct way to achieve it?
Any pointer or advice are greatly appreciated.
Thank you.
Short answer:
You need a local Git server which hosts a clone of your example repository from GitHub.
If your local Git server includes a web UI, you can probably see something similar like what you see on GitHub.
If you want future changes in the GitHub repo in your local repo as well, you need to pull periodically from the GitHub repo to your local repo.
Long version:
1. Hosting Git repos on your local server
There are a lot of options (paid and free) for running a Git server on your own machine.
Some of them contain web UIs which look similar (but not exactly the same) like GitHub.
There's only one option to get 100% the same look: by spending money for a private installation of GitHub (but it's not cheap).
If you don't want to spend that much, there are free alternatives, for example GitLab. This is a hosted service like GitHub, but the code is open source and you can install a free version on your local server.
Here's an example of a "repository overview" page:
https://gitlab.com/gitlab-org/gitlab-shell
GitLab is only one example, there's a lot more - just google for "self hosted git" and you will find plenty.
2. Getting a clone of the repository from GitHub to your local server
To set this up, clone the repo from Github to your local machine once with the --mirror option:
git clone --mirror https://github.com/user/repo some/local/path
To update your local repo with the newest changes from GitHub, you need to run git remote update periodically.

Github for Windows Pull Request for remote Bitbucket Repo

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

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

Best way to add an existing repo to git to a different branch behind proxy

There is a website in production.
I want to push the files in Git.
I think the client did copy all the files from his computer to the server using ftp.
I think he pushed his git perso files, cause I can see a .git folder in live.
I tried "git status" on the live server, It returns a list of files.
I did:
git remote show origin
->error: The requested URL returned error: 401 while accessing....
The live site use a proxy.
What's the best way to push the current live site to Github?
I want to create a new branch in github and then, on the server, I want to do:
$ git remote add origin http....
$ git push -u origin newbranch
Do you think there is a way to break the live site?
I have a copy of this website but I don't want to break the current website.
What do you recommend?
First create a backup? Then do the Github thing?
One way to break the live site is if you make an unintended git pull, once you managed to push it to GitHub!
Plus you would need to fiddle with the proxy in order to access to GitHub, all on the production platform.
I would really recommend having nothing on the production server except what is strictly needed to run the web site.
So not git.
Use rsynch/copy mechanism to publish on prod, but keep a git repo on another machine, one which can contact easily Github, and push from there (not from prod)