Skip to end of metadata
Go to start of metadata

So far, you've worked in a repository you own and you've been the only person working in it. You can only fully experience the power of a DVCS hosted repository by working with others. In this page, you work with a repository you don't own. You'll make a change to a code file, not just a README. You'll use Bitbucket's comparison features to compare your repository with the original.

The tutorial examples so far worked exclusively with Git repositories using git commands.  In this section, you'll work with a Mercurial repository.  If you start working extensively in the host DVCS community, you'll most likely find yourself working with multiple DVC systems. You may even find yourself working with other hosted products, such as GitHub or Kiln. It is good experience to see the workflow you'd use in these types of situations.

Linux or Mac User?

The examples on this page are written for Mercurial using TortoiseHg on Microsoft Windows 7. If you want to work in Mac OSX or Linux, see the instructions on this page.


When you work with another user's public Bitbucket repository, typically you have read access to the code but not write access. This is where the concept of forking comes in. Here's how it works:

  • Fork the repository to copy it to your own account.
  • Clone the forked repository from Bitbucket to your local system.
  • Make changes to the local repository.
  • Push the changes to your forked repository on Bitbucket.
  • Create a pull request from the original repository you forked to add the changes you made.
  • Wait for the repository owner to accept or reject your changes.

If a repository owner accepts the pull request, Bitbucket merges your code changes into the original repository. It is recommended that you work with forks and pull requests, even if the repository owner gives you write access to a public repository. While a pull is part of the Git and Mercurial workflow, pull requests and forks are concepts used only by repository hosting services — like Bitbucket.

Step 1. Fork another user's repo

 In this example you'll fork a public repository belonging to a user called tutorials.

  1. Log into Bitbucket.
  2. Locate the Search field in the menu bar.
  3. Search for the tutorials/ repository.
  4. Click on the search result to go to the repository.
  5. Click Fork.

    The system displays the fork page. 
  6. If your account is a member of a Bitbucket team, the page contains a field Owner.  If you don't belong to a team, there is no Owner field; Continue to the next step.
  7. Change the Name for example, to myquotefork.
  8. Enter a Description that you think is appropriate.
  9. Uncheck Inherit repository user/group permissions.
    There are several options for forking. For now, just leave all the remaining options at their defaults.
  10. Press Fork repository.

Step 2. Clone your fork

  1. Start the TortoiseHG Workbench.
  2. Choose View > Show Repository Registry.
  3. Choose File > Clone Repository.
  4. Enter location of your forked repository in the Source field. 
  5. Enter a destination on your system for your local repository, for example:
    When you are done the dialog will look similar to the following:
  6. Press Clone.
    The system clones the repository and displays it in the registry list.

Step 3. Make a change to the repository source

This repository contains a website which, as of this writing, has a an editme.html file. Bitbucket allows you to host a website in a Mercurial repository. To see the hosted website, go to – you may encounter an Untrusted Connection message. Go ahead through to the site. You'll see that the site contains a single page that lists favorite quotes from "bitbuckians" which is just a writer-invented word for users of Bitbucket. Now, it is your turn to record your favorite comedic quote...or just a favorite quote. Do the following to contribute to this repository:

  1. Use Google or some other search engine to locate your favorite quote.
  2. In the TortoiseHG Workbench, select the editme.html file.
  3. Right-click to display the context menu.
  4. Choose Edit Local.
    The file is an HTML file.
  5. Go ahead and add a quote of your choosing. You can add an image link to your quote if you like, just place it above the <blockquote> tag.

     Here is a sample of what an addition will look like:


    If you are not sure what to do, you can copy the  example tags at the top of the file, paste them just below the last quote on the page, and modify them with your quote, as shown in the preceding example.

  6. Close and save the file.
  7. Refresh the Working Directory.
  8. Enter a commit message in the space provided.
  9. Press the Commit icon (check symbol) to commit your changes.
  10. Press the Push outgoing changes to selected URL icon.

    The system prompts you to confirm your action.
  11. Press Yes.
    The system pushes your changes to the forked repository.

Step 4 . Compare your fork to the original

While you were working on your fork, another Bitbucket user might have made updates to the original repository. At this point, you can check that and decide if you need to adjust your fork accordingly. Do the following to compare your changes with the repository:

  1. Log into Bitbucket and navigate to your myquotefork repository. Forked repositories have a special widget that lets you compare your fork work to the original or to create a pull request.
  2. Click the Compare link on the left side of the page. The Compare section has a specialized view that is available only in forked repositories.
  3. Press the Compare button to compare your forked repository to the original repository.
  4. Click the Diff tab to compare changes from your fork to the original. If there are multiple commits, you see their cumulative changes by file in this section. Click the Side-by-side diff button to see changes displayed side-by-side. Or press the View file button to view the full file in Bitbucket.
  5. Switch back to the Compare tab to see the list of commits pushed from your local repository to the fork in Bitbucket. To see the contents of a specific commit in isolation, select a Commit link and the system takes you to the Commits page. 

You can merge your fork into another repository — for example a local copy you may have of the original repository. If you merge locally, you can test your changes before making a pull request through Bitbucket.

Step 5. Create a pull request

If you haven't already done so, log into Bitbucket and navigate to your myquotefork repository. Then, do the following:

  1. Press Create Pull Request.
    The system displays the request form.
  2. Complete the form.
    When you are done it will look something like this:
  3. Press Create pull request.
    The system opens your latest request on the Pull Request page of the original repository. To see the list of all the pull requests against this repo, click the Pull Request tab. 

Step 6. Learn what happens to your pull request

After you create a pull request, you can't delete it. Neither can the person that receives your request.  The receiver either merges or declines your request.  If you delete your fork after you make a request, the receiver can only decline your request because the repository to pull from is gone.

You have to wait for the repository owner to accept your pull request. When the original repository owner logs into Bitbucket, that user's newsfeed shows your pull request and your fork from a few days earlier, as shown in the following image.

When the repo owner clicks on your pull request, that user can Merge, Edit, or Decline (1) it. In addition to owners, anyone with access to the repository can Approve (2) the request, which means that the approver reviewed the changes in the pull request. The owner can also see any additional commits or activity (3) and how many files are in this pull request (4).

You'll get an email when your pull request is accepted or rejected. For now, continue to the next step.


That was intense. Maybe. Depends on your daily life. In the next section, you learn ways to be social on Bitbucket which includes adding users to your repository.


  1. Nice tutorial. Here is the point that should be considered timely. Due to a lot of forks and pull requests the tutorial repo size is growing. At this time it is 16.? MB it is due to images. If image links are put rather saving images in repo "image folder" it will be better for future. Tutorial repo should be lesser in size and efficient.

    1. Thank you for the comments.  You are right the quotes repo is, as one user put it, getting ridiculously long.   Links versus images is a trade off.  Often people link to very slow loading sites which slow the load down considerably. So, that's why images and not links are preferred.  I'll see about sweeping through and resizing the images — some of them are very large. 

  2. Backgrounder is very essential and good concept.

  3. Anonymous

    Great write-up, and I love the hands-on tutorial concept.  The annotated screenshots are also very helpful.

    1. Super! Thanks for the feedback on the screenshots!

  4. Anonymous

    In step 8.7-8.10 it took me a while to find the "Commit" and "Push outgoing changes to selected URL " icons.   A couple of your comments would be a good addition.

    1. Anonymous

      I mean adding comment bubbles to the image above.

      1. Good point.  I'll update the Tortoise HG screenshots with this on the next go round.

  5. Anonymous

    On the contrary to the previous chapters, this one has really caused problems for me:

    • the TortoiseHq Workbench is a different (newer) version, and the things about commit are quite different
    • I accidently gave the false user name (The instructions above DID NOT TELL WHICH USER NAME, and I gave TortoiseHq user name, not the bitbucket user name, as it should have been), and it went through, though it did not update the bitbucket repository. And I FIND NO WAY TO CORRECT THAT USER NAME. All change seem to be commited OK, but no changes go to the bitbucket. This one wrong thing mixed everything up, and I cannot correct it !!!
    1. I'm sorry you had problems with this chapter. You are right, I haven't picked up the latest TortoiseHg version and I need to do a QA against it. I'll bump it up in my todo list.

  6. Anonymous

    Any reason why the tutorial clones to tortoisehg just fine but when I go to clone my own I am getting a HTTP Error: 404 (Not Found)?

    1. Perhaps you didn't put the .git at the end of the URL (assuming Git). But more than likely the URL may be a little off. You can get an exact copy from the header of the repository after the "git clone" part.

  7. Anonymous

    For various reasons I didn't want to use or install mercurial - it would have helped me to have a GIT version of this section too... Though

    mercurial sounds so similar I'm guessing I could do the same in GIT following along the mercurial version.

  8. Anonymous

    Hi,I was following the tutorial.previous chapter went well for me.But in this chapter while trying to clone(clone your fork) other user repository(which is git repository,it is private and write access shared with me,having one readme file inside it) I am getting the error in TortoiseHg workbench.

    HTTP error:404 not found.The url i am trying having the extension .git.I have tried without .git extension also but it is failing.Please help me.

    1. Anonymous

      I'm new here, another fan of this awesome tutorial, and just had and fixed this same problem today when trying to clone the repository I'm actually working on.   Try GitGUI (or maybe TortoiseGit) instead. The 404 error seemed to be because of trying to clone a Git repo with mercurial tools?  Not sure exactly, but try that? Hope it helps. --molly


      1. Molly thanks for doing a better read of this user's problem. You absolutely hit on the problem. I deleted my response, I'll leave yours behind!

  9. Anonymous

    yes,using GitGui i am able to clone the Git repo.Ok this means only mercurial repo we can clone using TortoiseHg.For Git repo cloning we need to use GitGUI.

    Thanks a lot.

    I have another query that is, now i have forked and cloned the other user repo.Now if he does changes in 2-3 files and updates in his repo.How I am going to update only those files in my cloned I need to clone the whole repository again in my system.

  10. How do you delete a fork pls?

    1. Hi Belinda,

      A fork is repository like any other. From Bitbucket, you Deleting a Repository.   From your local system, just delete it as you would any other repository.


  11. Greetings .
    I'm using OAuth.js library and trying to get issues from private repo. When I'm apply more then one filter with the same name, server respons 401 UNAUTHORIZED (more information could be found here :
    Is this bitbucket or OAuth.js bug ?
    UPD: Sorry for wrong theme
    1. Eden,

      In case you haven't read it, see OAuth on Bitbucket.  The 401 error means your client's credentials were not accepted.  Try simplifying your code to just do a simple query.  If you still have problems, please send a request to


      1. Every query with parameters having different names is working fine, so I wrote a request to support.

        Thank you for your answer, Mary.

  12. Anonymous

    Quite helpfull, this whole 101 is really helping me understand this better.

    A little to criticize though, I had some troubles in the step 3 of the tutorial around the step 10, it's really confusing and found out that the option is a bit hidden, a screenshot of how to pull the option menu for "Push outgoing changes to selected URL" will be more helpful.


    Other than that, really good job and very helpful.

    1. Thank you for the comment and the compliment. I've accepted both. (big grin)

  13. I'm following along about using bitbucket and fork, and then in step 2 of this page (, it starts talking about TortoiseHG.  How do I start that program, and what relation does it have to bitbucket?

    1. Eric,

      If you are following the tutorial from start to finish, you should have already installed TortoiseHG. You would start it from the Windows Start menu once it is installed.


  14. Anonymous

    Typo: You can toggle bewteen the (...) instead of You can toggle between the (...)

    Great tutorials, thanks.

    Bitbucket user bartlomiejb

    1. Thank you and thanks for the catch. This is fixed. :D

  15. Anonymous

    fork, clone to local directory, change accordingly to what I want and then create a pull request? the pull request syncs the local changes with the forked bitbucked repository? 

    1. The pull request is a request to sync the changes.  It is up to the repo owner of the destination to accept or deny the request.

  16. What's the differences between a new "branch" of one repository and a new "fork" of it ? Thanks.

    1. A branch is within the repository; a repo can have many branches.  A fork is a clone of the entire repository and includes all the branches.

  17. Hi

    Is it possible to copy or move some issues from repository to forked one?


    1. We have an issue importer/exporter but it is all or nothing.  You can't select a subset.  Is it possible what you really want is to Change or transfer repository ownership or Split a repository in two?

      1. I think those links are not suitable for my case.

        I fork a repository to resolve some issues.

        Where these issues should be?

        1. Well, if you want to fix an issue by creating a fork and then making a pull request back to the source, you should create the issue on the source repository.  Any commits you make on the fork should include that issue tag.  When your request is pulled, it will link automatically back to the issue.

          1. Thanks, this is good

  18. Anonymous

    Step 1.2 says "Search for and then click through to the tutorials/ repository."

    I do not see anywhere in my Bitbucket account online where to find such repository.

    Could you provide some more detailed instructions on where to find it?

    Thank you.

    1. Anonymous

      I resolved this myself. I entered the path (tutorials/ in the search box in the upper right of the page. Maybe I jumped the gun on saying I couldn't find it, but maybe it could be mentioned to enter the path in the search box, too! (wink)

      1. Thank you for the comment. I'll call out the search more explicitly.

  19. Anonymous

    Step 2.3 says, "Choose File > Clone New Repository."

    The file menu lists "New Repository", and "Clone Repository", but there is no "Clone New Repository". I continued fine by selecting "Clone Repository".

    Tortoise Hg version info: TortoiseHg version 2.8 with Mercurial-2.6, Python-2.7.3, PyQt-4.9.6, Qt-4.8.4.


    1. Thank you for the catch. I've updated the instructions.

  20. Anonymous

    from Step 2

    Step 2. Clone your fork

    1. Start the TortoiseHG Workbench.
    2. Choose View > Show Repository Registry.
    3. Choose File > Clone Repository.
    4. ...

    What are the steps for doing this with GIT?  Someone named Molly said she found a fix using GIT Gui, however, in GIT GUI, I don't see steps 2 and so on.  Mary Anthony said Molly answered the question and subsequently deleted her solution, but Molly's doesn't help me.  Just telling me to do something using Git Gui when the language isn't the same in both GUIs is presumptuous. What are the steps of doing this in Git Gui?  Is it too much trouble to list the details?

    1. On the Git side, the tutorial uses Git Bash which is a command line not a GUI.  In GitBash, the steps for cloning a forked repository are the same for cloning any repository.  You can see those steps illustrated Clone Your Git Repo and Add Source Files.  Some vendors offer a GUI interface similar to TortoiseHG. Atlassian, for example, offers Sourcetree.  I don't document that here because GitBash is a standard for many shops.

      (BTW, I didn't delete Molly's response to the question above, I deleted my own.)

  21. What if you have more than one person with each its own fork, and creating branches?

    For example:

    • Main has only a default branch and is forked to main_a by user "a", and also forked to main_b by user "b"
    • User "a" then creates a branch branch_a in main_a, and then pull requests to make the new branch into Main
    • User "b" can only sync the main_b fork with changes from default.

    If user "b" sees the new branch in Main and wants it in main_b there is no way to pull request it in that direction

  22. Anonymous

    Ok, I should setup SSH for Mercurial first: Set up SSH for Mercurial

    You may probably put this SSH setup tutorial before this one?

    1. The tutorial teaches first with the HTTP protocol and then with SSH. HTTP is simpler for beginners at first.  SSH is more complicated and error prone due to the number of systems and steps involved. 

  23. Thank you for making the tutorial!
    Very helpful for beginners like me. (smile) 

    One silly problem I had was figuring out the commit button.
    Since there are two commit buttons; one at the top and one at the middle, I couldn't push any changes until I found the second commit button in the middle and realised the one at the menu bar did not actually commit.

    Perhaps it would be better to rename the commit button "Commit your changes" and maybe make it red (or a colour that's distinct and easy to see)?


    1. Jeffrey, which GUI were you looking at? Tortoise Hg or Bitbucket?

      1. Tortoise Hg (as per tutorial).

  24. Anonymous

    An initial Git Bash commit and push was successful with the original repo.

    But here I get stuck as step 2 with Tortoise HG cloning where:

    File > Settings > Commit > username = name <>


    File > Clone Repository...:

    Source =

    Destination = C:\Users\Name\repos\repo

    Hg command: hg clone --verbose -- C:\Users\Name\repos\repo

    Then clicking clone results:

    HTTP Error: 404 (Not Found)
    [command returned code 255 Tue Aug 20 15:55:36 2013]


    Is there something extra that needs to be done for setting Tortoise up ?

    1. Check what you are entering agains the screen capture in Step 4.  The 404 error says that the Source value is wrong.

      1. Anonymous

        Yes, I really couldn't see anything wrong with the source value, especially since I copied it from the browser address bar of the repo home page.

        I still didn't manage to do this with Tortoise.

        So I installed SourceTree and applied the same source and destination details and it worked.

        I was wondering if perhaps Tortoise and SourceTree treat the server key negotiation differently.

        1. You can't really trust the URL in the browser address bar to be correct. If you are moving fast, you might not notice they are not the same always.

          The best place is to copy the URL from the Clone dialog.

  25. What is the added value of the 'Approve' toggle button? Why would one approve without merging?

    Merging a request automatically implies that the request was approved, doesn't it?

    The statement that clicking that button "simply means the approver reviewed the changes in the pull request." applies just as well to clicking either the 'merge', 'edit', or 'decline' buttons.

    1. This really depends on your specific team's workflow. Merging may not mean that all the requested reviewers have reviewed and approve of the Pull Request. Some teams have a 2 approval minimum before merging, but perhaps they merge a PR here or there without waiting for approvals for hotfixes. In that case, the code wasn't approved, but still got merged anyway. Again, this all depends on how your specific team functions and how many processes you choose to put in place. 

  26. The repo REALLY needs to be cleaned up! It's taking forever to download it!!!!!

    1. Yep, I need to restart it again.   I'll do that.

  27. There is a step missing in Step 3.

    I couldn't figure out why my changes weren't showing up in my Bitbucket repository. The green checkmark button was depressed in the toolbar, and I clicked the "Push outgoing changes to selected URL" button, but kept getting the message "no changes found" in the Output log.

    But after I clicked the button that says "Commit", with the down arrow, right above the message window, my changes were pushed to the server.

    1. Mark, Step 3.9 is the commit step and 10 is the push. I can see the instructions for the icons looks a bit mushed up. I'll check the UI to see if it has changed since I last tested this procedure. Thank you for the feedback.

  28. This is a great tutorial! one quick question: I've been stumped on step 3.4. When selecting edit local my TortoisHG client alerts me with the error message "please configure a visual editor" - what are the settings for this visual editor? And what do change these to? Currently everything is 'unspecified' with no way to make changes - in most cases drop down menu does not populate any options. Thanks - I really appreciate your help!



    1. Whit, the visual editor is part of the TortoiseHg application. Looks like their documentation addresses that here:

      1. Mark,

        Thanks for your prompt reply! I've taken a close look at the link provided and unfortunately it only speaks to Windows users. I'm admittedly a noob myself, so I may be missing something. 

        Here's what I've done: After right clicking on the index file, the error I'm receiving "please configure a visual editor". Stepping into the TortoisHg preferences window and hovering over the visual editor box I see a prompt: "Specify visual editor, as described in the [editor-tools] section of your Mercurial configuration files. If left unspecified, TortoiseHg will use the first applicable tool it finds." 

        My issue lies in the fact that I'm unable to find these configuration files. Is this prompt asking me to define a visual text editor such as Sublime Text or Text Wrangler? Per your link, I see that there are some config files for windows users. The image in link doesn't provide a format for what should go in the visual editor window. Digging around some more, I've found a file in the file path: Library/Python/2.7/site-packages/mercurial/, but I'm lost after that. I feel like this should be a lot easier... what am I missing?? 

        I'm blocked until I can figure this out and really appreciate your help!

        Many thanks!



        1. Hi Whit (this is Mary – Mark is my cousin!) (smile)  Wow, haven't used that old joke in a bit.  For some reason, I thought you were on Windows.  You can find the Mercurial documentation here:

          You probably only want to configure the ~/.hgrc file which is documented here: (among other places)


          1. Thanks Mary (smile)

            I appreciate your prompt reply. I suppose I'm just missing something obvious - thanks for your patience! 

            I've been to the links provided and modified my hgrc file. At this point, I still don't know what TortoisHg is looking for when it requests a visual editor. After saving the hgrc file, it reads like this: 

            default =

            editor = %include ~/.Applications/Sublime Text

            I assume that TortoisHg is looking for a file path to a visual editor? Any tips would be great... I've been plugging away at this for 2 days and still totally in the dark. (sad) For reference I'm using a Mac.


            THANK YOU!


  29. Anonymous


    Thanks for the tutorial, I am finding it very interesting and a useful introduction.

    Unfortunately, I am having a problem I have forked the repository and edited the file without problem. When I 'Push the changes back to URL', there is a problem. The push aborts with the message: 'Push to aborted, ret 255.' I can find no indication of what this means in the Tortoise Hg documentation .

    I am baffled, can you point me in the right direction?

           Ciao Ric Evans



  30. Anonymous


     Can the 'compare branches' image and docs be updated as the intuitive left to right comparison (diff) has be replaced with a more confusing a bottom to top branch like widget.




  31. Anonymous

    I have a git repo at bitbucket and a local clone. Another person modified a file on her branch (or fork – the terminology still confuses me) and created a pull request. I can see the pull request and although it looks good, instead of merging it at bitbucket I would like to fetch it into my local repo, test and merge it there, then push (is that the right terminology) it up to bitbucket.

    My problem is that I cannot figure out how to fetch it into my local repo. I've tried the command line fetches at your other tutorial (Work with pull requests) but they just tell me that the repo is "up to date". I've also tried using git cola (I'm on Linux) with the same result. It seems like I need to access her branch/fork but I don't see a way to do that.


    1. Anonymous


      Can anybody (+manthony?) describe how I can accomplish this?

      I want to download the pull request and (potentially) merge it into my local git repo, instead of merging it into my bitbucket repo. If I like the change I'll eventually push it up to bitbucket; I just don't want to memorialize it in the bitbucket repo yet.

      1. Anonymous

  32. Anonymous

    I have Git installed , but I couldn't complete Mercurial installation as I am using windows 8 and it didn't allow me to install Putty. Is that the reason I am not able to view repositories while cloning? for source how do you get HTTPS URL?

  33. It appears the demo repo has expanded in size again with the tutorial. Took over 20 min. to download. Could you please purge again?

  34. Step 3.9 did not work for me. The green check mark did nothing, and I got the message that no changes were made. Instead I had to click the commit button on the far right side, and then it "worked". My commit message shows up and apparently was copied to bitbucket, but my quote, which I can see in TortoiseHG, is nowhere to be found in the editme.html on bitbucket.

    There are no mercurial commands on display inviting me to merge my changes. So it looks like I have a "commit", which is just a message, but no "diff" - no actual changes to the file in question.

    Nevertheless, I continued with a pull request. I see some other recent ones have been accepted and other have not. I don't know if any of that means some of them are having issues like I am. I would think for a tutorial like this they'd all be accepted, but I'm new, what do I know?

    I am on windows 8.1. Clarification would be appreciated. 

  35. The editme.html file is implicitly defined as UTF-8 (because there are some non-ASCII characters which are in UTF-8), but it lacks the BOM and the HTML header declaring it as real UTF-8.

    Be careful, someone might corrupt it if he's using some "bad text editor".

    I suggest adding the BOM and the appropriate HTML header.

    1. Thanks for writing.

      Yes, you are correct the file is actually missing all the header information. This is because the content from editme.html is pulled into a different file to automate the process. The automation was triggered when a merge request was submitted. However we've temporarily shut that part off and just had the contents of editme.html pull into a separate file which is published and what you see on the site.

      So that's the long way of saying, yep it's missing but it's a feature not a bug (wink). You are also correct that I often have to fix encoding errors but because we restrict entries to the single <div> set with a quote it's usually limited to just eliminating the extra space error mentioned in the readme of the repository. 

      Perhaps I'll undo all this and revert to just having a single file in the future.

      Thanks for commenting and have  a great day!

      1. About the rendered page, Oh!  It actually works!  Why did I say so?  Because in "Step 3. Make a change to the repository source" of this tutorial, we are told to go to while the URL you just gave is  So I had always been thinking I had to open the editme.html directly to see the result.  Oh yeah, http and https are very different for your tutorial/quote website and that was hard to guess.

        OK, I understood the lack of HTML header in the file because it will be merged into another bigger HTML file.  But how about BOM?  Its presence can avoid potential gibberish characters due to wrong encoding because some bad text editors might have wrongly guessed the encoding.


        1. Good catch. I have fixed the URL in the step. Thanks!


          1. I'm curious to know why http and https would give two different results (ie two different web pages) while in normal situation they should not.

            1. Honestly, I don't know. I'll look into that. It looks like when I type the URL in as I get the introductory paragraph but not the full page... weird.

  36. I have committed a change and submitted a pull request which was accepted.  Now, is there any consequence to the upstream remote repo and other repos if I remove my forked repo?  (Of course, this question does not only apply to this tutorial repo, but it is asked in a more general sense)

    When I look at graphical representation of all these forks and pull requests, every fork and pull/merge related to a repo is drawn as a continuous curve, emerged from a point in the main repo and merging back to the main repo in another point. If I remove my repo, and when somebody else is looking at the graphical representation around my pull request, will it appear as if a pull existed out of nowhere? ("nowhere" means a discontinuous curve without any previous fork).

    1. Good day,

      Forks work differently than branches and what you see represented graphically is more a representation of what happens on the branch than the associated forks.

      Now, is there any consequence to the upstream remote repo and other repos if I remove my forked repo? 

      If the pull request has completed and the change you made in the fork is merged, then no the state of the origin repository and the forked repository goes back to each being their own entity. Unlike branches, where a change will be viewable in the repository, a fork is an independent entity until a merge or pull request is begun.

      Hope this helps! Thanks for commenting.

      1. OK, thanks.  I'm going to remove my forked repo in order to release resources back to Bitbucket (smile)

  37. Update screenshots to use SourceTree!

    1. Working on it! I'm modifying the tutorial to use SourceTree. Almost have that ready. (smile)

      1. Is it possible to keep an archive version showing TortoiseHG client?  I'm one of those users who don't have Win7 and thus can't use SourceTree.  I was glad that this tutorial was using THg when I was a newbie.

        1. Hi T.F.,

          I think we could do that. (smile)
          I know that many people have requested a Linux version of SourceTree but I don't know where they are in that process. I use the Mac and Windows version's, but primarily the Mac and I've grown quite fond of SourceTree. I will however see what I can do to maintain a TortoiseHG version.

          Thanks for the feedback!

          Happy coding

  38. Hey, so this has bitten me in the butt more than once.

    PLEASE, for the love of all that's holy, default to merging to the local fork's master before defaulting to the previous project's fork! 

    So say I have a project A.  Project A has all kinds of nice goodies that I need for project B.  I fork A to make B, and then get to work in B.  I make a branch in B and then want to make a pull request.  The default for this behavior should be to merge to B's master, NOT A's master.

    1. Thanks for taking time to comment.

      I see your point, I guess I hadn't considered this for the tutorial because I don't have a branch task in this tutorial (though I do in the 101). I'll add in an informational note to merge to master on your fork (B in your example above) of the repo before you create a pull request to the tutorial master repo (A in your example). (smile) 

      Happy coding,




  39. Very useful tutorial!

    But I think you must listen to the @Mark Roden's suggestion!

  40. Hi all very great tutorial.

    Now Inhave a question. I simulate collaboration with two people and so the manager create the repository. the developer fork it clone it on his PC make new branch with some commit push it on his repository, send a pull request to the manager.

    The manager recive the pull and decide to merge it. after that create a new branch and ofter a commit merge it.

    If I try to compare my fork repository with the manager's one but It don't find any diff to merge. Is it normal?

    If Yes How can I update my fork repository.

    Thnaks alot Miky