Contributing to Homebrew: git-related questions
- From:
- Anand Buddhdev
- Date:
- 2011-09-20 @ 12:53
Hello brewers,
I've just started using Homebrew, and I love the concept. It's easier to
work with and understand than MacPorts.
I've noticed that some formulae are outdated, and I want to contribute and
update them. I read the wiki instructions for contributing, and tried to
update 2 formulae, and ran into some issues. I'm afraid I don't know enough
about git, so I hope you don't mind me asking about it here.
So I've got a standard brew installation, and I've run "brew update" to get
the latest version of brew and all the formulae.
I then edited one formulae, for the unbound package, and committed the
change. When I tried to push the change to my fork of Homebrew, I got an
error relating to fast-forward, which I guess happened because the master
Homebrew repository had seen commits in the meantime.
So how can I keep my standard Homebrew installation and my forked copy in
Github in sync with the master Homebrew repository, so that I don't get
these errors? (in the previous case when I got the errors, I fixed it by
deleting my repository completely, and re-forking it; that's just wasteful).
Regards,
Anand
Re: [homebrew] Contributing to Homebrew: git-related questions
- From:
- Max Howell
- Date:
- 2011-09-20 @ 13:31
Check someone hasn't already updated the formula but it's waiting to be
merged by searching the issue tracker.
If you need the updates you can `brew pull PULL_REQUEST_URL` to get the
changes in advance.
> Hello brewers,
>
> I've just started using Homebrew, and I love the concept. It's easier to
work with and understand than MacPorts.
>
> I've noticed that some formulae are outdated, and I want to contribute
and update them. I read the wiki instructions for contributing, and tried
to update 2 formulae, and ran into some issues. I'm afraid I don't know
enough about git, so I hope you don't mind me asking about it here.
>
> So I've got a standard brew installation, and I've run "brew update" to
get the latest version of brew and all the formulae.
>
> I then edited one formulae, for the unbound package, and committed the
change. When I tried to push the change to my fork of Homebrew, I got an
error relating to fast-forward, which I guess happened because the master
Homebrew repository had seen commits in the meantime.
>
> So how can I keep my standard Homebrew installation and my forked copy
in Github in sync with the master Homebrew repository, so that I don't get
these errors? (in the previous case when I got the errors, I fixed it by
deleting my repository completely, and re-forking it; that's just
wasteful).
>
> Regards,
>
> Anand
Re: [homebrew] Contributing to Homebrew: git-related questions
- From:
- Dave Bayer
- Date:
- 2011-09-20 @ 13:07
On Sep 20, 2011, at 8:53 AM, Anand Buddhdev wrote:
> I then edited one formulae, for the unbound package, and committed the
change. When I tried to push the change to my fork of Homebrew, I got an
error relating to fast-forward, which I guess happened because the master
Homebrew repository had seen commits in the meantime.
When I got these errors, I was trying too hard, and these errors were
specific about what git commands I shouldn't be using.
You want to create a git branch that will be your pull request, and make
exactly the changes needed to fix a single formula. Then don't worry about
keeping this branch in sync. Unless a conflicting change is introduced to
Homebrew, it will always be possible to apply the changes represented by
this branch, to the current development head of Homebrew.
Git really works fiendishly well, compared to other version control
software I've used. I found it helpful to read some tutorials, and I
switched to git for everything.