Cannot push GitHub changes form Atom editor - github

I've been giving GitHub's Atom editor a try but am struggling to get the GitHub integration to work. I cloned a repository from my account and cannot push the changes back to GitHub.
I just added a test file called "otherfile.html", committed those changes, and tried pushing it. It comes up with a login for GitHub twice were I enter my username ans a Personal Access Token (I have two-factor authentication setup). Then it gives me this error message:
The tip of your current branch is behind its remote counterpart. Try pulling before pushing again. Or, to force push, hold cmd or ctrl while clicking.
Not sure if it is related, but the GitHub tab says this:
No Pull request could be found fo the branch master on the repository gabrielewig/gabrielewig.github.io
You can manually pin a GitHub pull request to the current branch by entering its URL:
Any help would be appreciated! The exact repo can be found here: https://github.com/gabrielewig/gabrielewig.github.io

First, switch to command line to see what git status give you.
And do a git pull if it still mention your master branch is behind its remote counterpart.
Second, check your git config credential.helper value.
On Windows for instance, the GCM helper would need your username/password (not PTA) in order to create a PTA.
Finally, do check "Improved pull request experience in GitHub for Atom" (Sept. 2018)
we’ve added a pull request list view. Now you can see the most recent pull requests in the GitHub tab Ctrl+8 with information such as:
Author’s avatar
Title of the pull request
Pull request number
CI status
“Last Updated” information
In addition to seeing more information about your existing pull requests, you can also open a new pull request directly from Atom.

Related

How do I activate GitHub Pull Requests and Issues on VSCODE?

I'm trying to install 'GitHub Pull Requests and Issues' on VSCODE which worked but I can't do anything, like login to my GitHub account.
I already have Git installed on my Computer.
you need to be on the GitHub Pull Request page. Click on the create new pull request button. Then choose a target branch to which you want to pull, and from which you want to pull.
When you click “Create”, if the branch is not yet pushed to the GitHub remote repository, the extension will ask whether you want to publish the branch and provide a dropdown menu for you to choose from.
The Create Pull Request, automatically allows you to review details in the pull request, in the Review Mode. You can add comments, reviewers, labels, and finally merge the pull request when it is ready to go.

Cannot submit a pull request in angular/angular

I discovered a minor bug in Angular's code, opened an issue on GitHub ( https://github.com/angular/angular/issues/19078 ) and now I am asked to submit a pull request but I'm not a "git pro" and however I try it doesn't work out.
What I did:
I read the guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-a-pull-request-pr
signed Google's CLA.
cloned the repo using: git clone https://github.com/angular/angular.git (was it necessary?)
edited the buggy file. (but without having the files, this step wouldn't have been possible, right?)
made my changes in a new git branch: git checkout -b my-fix-branch master
commited my changes: git commit -a
VIM opened, I put in a message, closed the editor.
commit seemed to be successful because in the terminal I see: [my-fix-branch 24f1f306e] docs typo fix 1 file changed, 1 insertion(+), 1 deletion(-)
tried to push it: git push origin my-fix-branch
typed in my GitHub credentials.
And now I face the error message: remote: Permission to angular/angular.git denied to swirlsky.
fatal: unable to access 'https://github.com/angular/angular.git/': The requested URL returned error: 403
First I should complete this, and only after that I should open a pull request on GitHub, otherwise how could they know what changes I made in the code, right? ...and for that, will this one be the appropriate page: https://github.com/angular/angular/compare/master...4.4.x ?
You have to fork angular using the fork button on the top right corner
You will have a new repo at yourusername/angular, work and push on it.
Then, you'll be able to submit a pull request

How to create a Git pull request from within Eclipse

I can't seem to find in the egit documentation how to create a pull request from within Eclipse once you push a branch to a remote repository.
All the searches I've tried pull up command line answers or answers on how to do it from the web interface.
So right now I'm having to:
Make changes and commit locally to my branch
Do a "Team -> Push Branch..."
Once that's complete then open the remote repository from web browser and create a pull request from my branch there.
I want to be able to do that last step from within Eclipse.
This is not possible. Neither with egit nor with the github mylyn connector (which only allows you to track existing pull requests). You have to use the browser or other tools.
However, if your git server returns a result message containing a URL to your newly pushed branch, then the push result dialog shows that URL as a clickable link that you can use to open your browser more quickly on the right page to create a pull request.

Github / EGit pull request workflow

Say I have a repo and someone forks it. Then they do work and submit a pull request. But the code contains a large number of lines and/or it creates a GUI. I'd like to fetch it so I can actually see it run from Eclipse before merging it into my master. The options I've come up with are:
Create a second repo in EGit and clone directly from their fork.
Create a new branch just for them. Then leave a comment for the request asking them to re-submit the pull request using the new branch and that I'll be closing the current request (without merging)
Always keep around a branch for them to use in their pull requests.
Besides setting up an organization on Github what else could I do?
Then leave a comment for the request asking them to re-submit the pull request using the new branch and that I'll be closing the current request
They don't have to re-submit, it you test and merge first locally, as described in the "Merging a pull request" GitHub page.
git checkout master
git pull https://github.com/otheruser/repo.git branchname
If the local merge works, then you can go ahead and merge the pull request through the GitHub web interface.
GitHub has documented how to checkout a pull request.
As I have illustrated before in "What support for git namespaces exists in git hosting services", you can use refs/pull/<PRNumber>/head as remote pull reference, in command line or in Egit when, for instance, creating a new branch.
If the PR number is 123, you can simply use the EGit Pull action, and use pulls/123/head as reference.

Delete a closed pull request from GitHub

I accidentally made a wrong pull request and ended up closing the request myself. It's in a closed state right now but it's accessible via direct URL and showing on my activity bar.
Is there any way to delete a pull request completely so it's no longer accessible via URL or shows up on your activity history?
There is no way you can delete a pull request yourself -- you and the repo owner (and all users with push access to it) can close it, but it will remain in the log. This is part of the philosophy of not denying/hiding what happened during development.
However, if there are critical reasons for deleting it (this is mainly violation of Github Terms of Service), Github support staff will delete it for you.
Whether or not they are willing to delete your PR for you is something you can easily ask them, just drop them an email at support#github.com
UPDATE: Currently Github requires support requests to be created here: https://support.github.com/contact
5 step to do what you want if you made the pull request from a forked repository:
reopen the pull request
checkout to the branch which you made the pull request
reset commit to the last master commit(that means remove all you new code). Command: git reset --hard commit_hash_here
git push --force
delete your forked repository which made the pull request
And everything is done, good luck!
This is the reply I received from Github when I asked them to delete a pull request:
"Thanks for getting in touch! Pull requests can't be deleted through the UI at the moment and we'll only delete pull requests when they contain sensitive information like passwords or other credentials."
It's very easy actually:
You can empty it, that's the best you could do.
Go to your local
Copy your local branch unwanted-branch (against which the PR was opened) to a new branch new-branch. This copying is relevant if you want to back it up for any reason. Otherwise go to step 3.
$ git branch -b new-branch
$ git merge unwanted-branch
$ git push
Empty the unwanted-branch
$ git checkout unwanted-branch
$ git reset --hard HEAD~n #n is the number of commit the branch has
$ git push -f
Enjoy, your PR is empty and closed now ;). Go to remote and delete the unwanted-branch if it bothers you.