_Basics of Forking Git

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Forking is a way for you to create an exact copy of a repository at a specific point, and take it from there. This is particularly useful if you have reader permissions for the repository but not writer permissions, and if you want to do some major development work that you may or may not later merge back into the repository.

Here is the basic workflow:

  1. Go to the repository that you want to fork on Bitbucket and click Fork.
    This gives you a clone of the code from the point where you fork it.
  2. Clone the new fork to your local machine:

    git clone https://bitbucket.org/MY_USER/MY_REPO
    
  3. Work on the files in the local repo.
  4. Commit changesets to your local repository:

    git commit -m "MY COMMIT MESSAGE."
    
  5. Push your changes up to the remote fork on Bitbucket:

    git push https://bitbucket.org/MY_USER/MY_REPO
    
  6. Create a pull request for the owner of the original repository.
    Once you are satisfied with your changes, you can ask the owners of the original repository to pull in your changes and merge them into the main repository.
Last modified on Jul 13, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.