Jump to content
jaBote

Making Pull Requests on Hercules

Recommended Posts

Do you remember the many advantages Git has against Subversion (SVN)? One of those many advantages is the fact that in Git, you can send pull requests in order to directly collaborate with the community, without even the need of being an official Hercules dev, and if you contribute enough you can surely become a dev if you want. Well then, this is an – as detailed as possible – guide on how to make them.
 
First of all: What is a pull request? It's a way of telling the original devs of a (commonly open-sourced) project what changes you've made yourself on their project supposedly for the better, and kindly ask them (request) to merge it (pull). In short, it's a way of collaborating to a project without the need of being related at all to it. Obviously, your pull request may be rejected if it doesn't meet some requirements, but this is another story.
 
Git does also offer its own tools for pull requests (more info), but they're incompatible with the ones GitHub has. Moreover, GitHub pull request tools are easier to use than Git's.
 
What steps are required in order to do a pull request? In abstract, you'll have to:

  • Sign up for a GitHub account, if you don't have it already.
  • Fork Hercules project in GitHub, if you haven't done this already.
  • Clone your previous fork to a local repository in your computer, if you haven't done this already.
  • Work on your fork.
  • Commit your changes to your local repository.
  • Push the changes you've previously committed to your remote repository on GitHub.
  • Make the aforementioned pull request to the Hercules official repository.

Steps 3 and 5 have already been shown on the Obtaining Hercules guide by @Ind (Obtaining Hercules through Git on *insert OS here* and Troubleshooting sections). These two steps will be slightly reviewed, but expect a fully detailed how-to in the others.
 
By the way, GitHub also has its own (generic) guides on how to fork a repo and then make a pull request, which also explain the toughest parts of this guide (though they're not so tough) and cover steps 2-6 (supposing you have a Git console). You're encouraged to go and read them if you want.
 
Well, here we go with the guide!
 
Step 1: Sign up for a GitHub account

  Reveal hidden contents



Step 2: Fork Hercules project in GitHub

  Reveal hidden contents



Steps 3 to 6: Local computer work

  Reveal hidden contents



Step 7: (Finally) submitting the pull request

  Reveal hidden contents


 
Congratulations! You have successfully made your first pull request on Hercules! This is a reason to be proud of yourself, isnt it?

Share this post


Link to post
Share on other sites

Frequently Asked Questions (FAQs):



I thought splitting this section from the main post would be beneficial because it's easier to write it and to look in it in case you need an answer and I have it down there.



I hope there are almost no questions because I think my guide is clear enough, though it's normal there will be some questions out here since my explanations aren't perfect. That's why this dedicated section exists.



Questions will be marked with a big Q and answers will be marked with a A. Both will be big enough to easily tell them apart.



Question list:

  Quote

 

  • I get a warning message while trying to make a Pull Request on GitHub. What happens?
  • How do I update my fork to Hercules' last version?
  • I always get an error message whenever I try to push my changes even though I make sure I put correct access credentials. What's happening?
  • I can't commit anything to my local repository. What happens?

Questions & Answers:



Q: I get a warning message while trying to make a Pull Request on GitHub. What happens?

A: You can't make a pull request if you get a warning message from GitHub. Those messages usually provide enough information to tell you what to do. Here are all warnings I've received from GitHub to date and its possible solutions – just remember to change HerculesUser to your GitHub username–:

  • Oops! HerculesWS:master is already up-to-date with HerculesUser:master Try a different branch?
    • You haven't pushed any changes to your remote repository or the changes you've pushed make it identical to the original Hercules repository. You can only make a pull request if your repository is not exactly the same as the original Hercules'.
  • Oops! There's already a pull request for HerculesUser:master Try a different branch or view the pull request?
    • You already have an active pull request on Hercules and you have to wait until it's approved or rejected. If you want to add changes to your pull request, you can push more changes to your repository if you want: they'll automatically be added to your active pull request.

Q: How do I update my fork to Hercules' last version?

A: This is quite simple but not as easy as updating an official Hercules repository as you can't just pull as you did when updating the original Hercules repository – if you try to pull on your fork you're pulling from your fork's repository, not Hercules' –. Doing this task also depends on your OS:

  • On Windows: (I don't deem necessary to add a how-to picture for this)
    • Right-click your Hercules fork folder and select Fetch... option from the TortoiseGit submenu.
    • A new window will pop up. Select Arbitrary URL option and place original Hercules repository URL there (I mean this one: https://github.com/HerculesWS/Hercules.git). Then click OK (unless you want to change any of the available options, which is unfrequent) for making the fetch update to start.
    • Another window will be opened and your fork will be updated to Hercules last revision. Close it once you're done.
  • On Unix: You just have to run this command (it's actually two commands joint on a single shell statement):
    git fetch upstream && git merge upstream/master

Just remember that if you want these changes to also be on your GitHub repository, you'll have to push them. Otherwise they'll just be available on your local repository, as always.



Q: I always get an error message whenever I try to push my changes even though I make sure I put correct access credentials. What happens?

A: I've just experienced this error when I tried to push to the wrong repository (i.e. the original Hercules repository, to which I don't have access and you surely don't). Make sure you're trying to push to a repository on which you have permission for this. Ah! Also make sure you have an active Internet connection since you'll be using it!



Q: I can't commit anything to my local repository. What happens?

A: Chances are you're trying to make a commit without changing any file, and that's not possible for Git. Maybe you actually changed some files but forgot to save them?

Share this post


Link to post
Share on other sites
  On 5/20/2013 at 5:12 AM, bgamez23 said:

is there any possible to have a mirror on svn?it so hard to make an update to the server if you made a lot of modifications. :mellow:

git actually makes it easier if you have modifications.

However it is also possible to do a svn checkout.

Check this out for more info: http://herc.ws/board/topic/152-obtaining-hercules/

Share this post


Link to post
Share on other sites

git fetch upstream && git merge upstream/master

 

when i try this it says...

 

fatal: upstream does not appear to be a git repository

fatal: the remote end hung up unexpectedly

 

update: it works now, i just needed to configure the upstream.

Edited by mofo

Share this post


Link to post
Share on other sites

i just want to request to make a video how to pull request, because there are people (like me) still not get how to make a pull request, i just tried it but i get error when making push, "git did not exit cleanly, error (128)"

Share this post


Link to post
Share on other sites
  On 10/27/2013 at 9:53 AM, jaBote said:

Try to scroll up a bit, there's some explanation text up there. What does it say?

 

it say's "git did not exit cleanly, error code (128)"

Share this post


Link to post
Share on other sites

If you're using TortoiseGit, you'll usually get some more text if you scroll a bit up the error message, so that I know a bit more of info about that.

Share this post


Link to post
Share on other sites

Well, I use bash and till yesterday it was working fine, but now,

I can push my local changes of old branches but when I create new branch, then push it to repo, it just ask user and pass, thrn it stuck there, waited 1 hour, then also no change. Git processes seems to be running in background(in task manager it shows git applications), reinstalled git too. Set buffer size very high too, even tried to use ssh link, still no luck.

 

Any help?

Share this post


Link to post
Share on other sites

OMG I didn't realise the pics were gone. I'm mostly out of here because of time and college issues, but will try to give it some time.

 

Any suggestion or just updating the images and text, if applicable?

Share this post


Link to post
Share on other sites

Imageshack was the only serious alternative to an image service I dislike (for personal reasons) such as imgur. Guess I'll have to swallow it. Not sure, but hope I still have the guide pics on my PC as I do with the other guides I wrote in Spanish...

Share this post


Link to post
Share on other sites
  On 4/14/2015 at 9:31 AM, jaBote said:

Imageshack was the only serious alternative to an image service I dislike (for personal reasons) such as imgur. Guess I'll have to swallow it. Not sure, but hope I still have the guide pics on my PC as I do with the other guides I wrote in Spanish...

Search , else I will screenshot a set of images for you xD

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.