Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 497091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:44:54+00:00 2026-05-13T05:44:54+00:00

So I have cloned a project at github and fixed a patch. Since this

  • 0

So I have cloned a project at github and fixed a patch. Since this is the first time Im working in git Im trying to figure out the best way to put it online.

Upon checking out my own (cloned) repository on github there was only one branch: master. I created a branch, myfix, which now holds one commit, which is the fix for the bug.

  • Should I now push everything to my cloned project on github? I assume that this would create the branch myfix on my github project containing that single fix commit.
  • Should I merge myfix into the master branch, remove myfix and then push everything?

When searching online, it seems that the common/good practice is to leave master untouched, using that purely for pulling from the real/original public project repository (that is, others accepted contributions and such). But others suggest other strategies:

  • Create an upstream branch, put your clean and ready contributions there so others can find them easy, not mixing it up with my other incomplete/experimental branches (I wonder why these would even be online if they were so incomplete).
  • Create a downstream branch, pull others changes in here for offline merging.

If I follow the above two (currently feels a bit overkill though) what purpose would the master branch fill?

Git can do any combination (or all) of the above. This leaves me a bit confused as to how to easy show my work to others. Is there such a “common” workflow? Or is it every man for himself and you post a specific revision in a specific branch (thats pushed) in the issue tracker for the fixed bug?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:44:54+00:00Added an answer on May 13, 2026 at 5:44 am

    When you clone a repository, Git automatically creates remote tracking branches that do what you describe for the master branch. You can list these remote tracking branches with:

    git branch -r
    

    Because tracking the upstream repository is already done for you, you would normally use your master branch for mainline changes to the project. Here’s what I would do in your particular situation:

    • Merge the myfix branch into master in your clone. (Having done this in a “topic branch” is good practice.)
    • Push the master branch to Github. (It’s unclear whether you forked the original repository, or just cloned from it. You will need to fork the original repository, creating your own copy, for the next step to work.)
    • Send a Github pull request to the owner of the repository you forked.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 373k
  • Answers 373k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This page explains how to implement INTERSECT and MINUS in… May 14, 2026 at 7:35 pm
  • Editorial Team
    Editorial Team added an answer To respond to myself, just for the reference. The problem… May 14, 2026 at 7:35 pm
  • Editorial Team
    Editorial Team added an answer Not supported YET. Read more about this here: http://code.google.com/p/android/issues/detail?id=3422 For… May 14, 2026 at 7:35 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.