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.
Related
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.
I am fairly new to the eclipse world. When reviewing other people's pull request from Github, is there a way to get their code in my eclipse like creating a new branch. And get their code running on the my server to test out.
You'll want to go to the Git Repositories view in Eclipse and specify a new repository to clone, using the url of the repository from Github. Make sure you specify to fetch all of the branches. After the clone is complete, select "Switch to" on the repository, and select the option to specify the branch to switch to. Specify the branch you want, then select "Check Out". You now have the code for that branch.
I want to build an automation to create many pull requests on GIT by just click of a button. Input for the API would be source and destination branch. I have come across ways to checkout repository using jgit but did not get anything to create pull request automatically. Please assist.
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.
I have a GitHub source control tool added to my copy of Visual Studio 2013 and when I right click on the solution and make a commit it says created the commit locally. When I try to sync the commit with the server, the sync button is greyed out.
My question is how do I set it up or what steps do I take so that the commit is pushed to the server?
It looks like you do not have the upstream remote / branch configured for this branch. Visual Studio operates as if the "push.default" configuration is set to "upstream".
If you go to the branches page, this branch should be listed under the "Unpublished" branches section. From that page, you can choose to "publish" this branch by right clicking on the unpublished branch and selecting publish in the resulting context menu. This will push the branch to the origin remote (with a branch of the same name as your local branch) and set the upstream tracking information for this branch. From then on, you can push and fetch from the Unsynced Commits page.
Here is a screen capture of where you need to go to publish an unpublished branch:
You need to add the online GitHub repo as a remote in your local git repo.
On the command line, that's git remote add origin <urL>; I don't know if the VS git UI exposes this.
We use Atlassian Stash but also found the Visual Studio UI a bit confusing at first. The sequence that works for us, using only the UI, is as follows:
First you have to add your "username" and e-mail address in the Git global settings via Team Explorer > Home > Git > Git Settings
On the "Solution Explorer" tab, right click on the solution and "Add Solution to Source Control" and choose Git.
On the "Team Explorer" tab, click on the repo you just created and go to branches
Choose the master branch, right click on it and choose "Publish" - you will be asked for the remote URL whereupon after you enter it, you will get a username/password prompt (for the remote server i.e. GitHub, Stash, etc.)
All this is doing is git push origin masterbut Microsoft chose to make it confusing by giving it another name.
Wait for the "publish" to be completed (there will be a file transfer status shown in the UI)
Once it is completed, go to the commits tab and you will see that all the options for Push/Pull/Fetch etc are available
Note: If you create another branch locally, you will have to push, er "publish", that one as well before the remote knows about it.
Final note: Visual Studio will not create projects and repos for you on the remote. You have to make sure the repo is setup on the remote before you can push a branch to it.
Weird issue: We found that if you try to push to a branch but fail (due to incorrect URL or a permissions issue) that we had to go back to the command prompt to "fix" the remote configuration for the repo/branch. This is using the standard git command:
git remote add origin https://myuser#stash.mycompany.com/scm/myproject/myrepo.git
After you publish a branch as in #jamill's answer you may run into this.
In Team Explorer, I was able to publish a branch, but then I could not do anything. Pull and Push were grayed out as shown:
So I did Actions > Open Command Prompt. Then Type:
git push origin My_Branch_Name
After doing this I could see the branch and my commit in my remote. (Github or whatever in your case). Also when running the command, the output said,
remote: Create pull request for My_Branch_Name:
If you want to keep this branch and merge it into master, then you can create a pull request on your remote. Otherwise as in my case I want to abandon the branch. You don't have to do anything.