• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Creating pull requests

 
Sheriff
Posts: 7126
185
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's the best way to create a pull request for the ranch corral?  Clone the repository and make changes there or create a branch and create pull requests from branch to master?
 
Bartender
Posts: 15737
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cattle drive, or the Corral?

I don't understand your question, because the options you gave are not mutually exclusive, and on top of that a pull request is *always* based on a source and a target branch.

The easiest way to do things in the long run is to clone the repository, create a local branch from a branch that you want to base your work on (usually master), and make commits on that branch which you can occassionally push back to the remote origin.

Commit early and commit often. This means that you make small changes which you can then easily describe in a short commit message. Large commits that contain an entire day's work (or more) are hard to describe and rebase or cherry-pick.

If you made a couple of commits and you're happy with your progress (or simply want to back up your work), push them to the origin. This is also the time to consider rebasing your commits, if you want to clean up your commit history to make it a little bit easier for others to track. Once you push, rebasing becomes messy because you're rewriting history that others might already have fetched.

When your branch points to a bunch of commits that together form a complete and stable enhancement to the project, create a pull request to merge your branch back into the branch that you based your work on. I find it easiest to do this by browsing to my branch on GitHub and then pushing the big green pull request button. You can also do this through the command line, but I find that GirHub gives you a nice summary which you can review before submitting the pull request.
 
Knute Snortum
Sheriff
Posts: 7126
185
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Cattle drive, or the Corral?


Ranch Corral, yes.  Sorry.

I don't understand your question, because the options you gave are not mutually exclusive, and on top of that a pull request is *always* based on a source and a target branch.

The easiest way to do things in the long run is to clone the repository, create a local branch from a branch that you want to base your work on (usually master), and make commits on that branch which you can occassionally push back to the remote origin.


Let me explain more thoroughly.  To create pull requests, I'm used to forking the original repository to my GitHub account, cloning that repository to my local drive, making changes on the local drive, pushing back to my GitHub repo, then creating pull requests from there.  But this doesn't work for the Corral -- I'm guessing that this is the "no outside repos" restriction that I read about.

So now my understanding is that I clone the RanchCorral/Blackjack GitHub repo directly to my local drive -- no fork.  Then I create a branch in my local git repo and push that branch directly to RanchCorral/Blackjack in GitHub.  Then I create a pull request from my new branch in RanchCorral/Blackjack to the master branch.  (This is the step I didn't know you could take until a few days ago.)  Sound right?
 
Stephan van Hulst
Bartender
Posts: 15737
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't actively disable the option to make pull requests from a forked repository. If that's the way you prefer it, I can see if I can find out how to enable pull requests from forks.

Otherwise, feel free to work directly on the shared repo.
 
Knute Snortum
Sheriff
Posts: 7126
185
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay.  Well, this is about learning, so I will do it the "new" way for me.  Thanks.
 
Ranch Hand
Posts: 393
9
Open BSD BSD Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About collaborative development models
fork and pull  Vs  shared repository models
 
Harry Kar
Ranch Hand
Posts: 393
9
Open BSD BSD Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Harry Kar wrote:About collaborative development models
fork and pull  Vs  shared repository models


Pull Requests(PR) can be made from GUI as described in link or also trough CLI by  hub (a github's git wrapper tool)
that have to be downloaded and "installed" locally.  
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic