-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better workflow #58
Comments
(For people who read this: this is also a good example of open source contribution workflow: if your contribution is non-trivial, it is often a good idea to open an issue and discuss the change before directly opening a PR.) |
This is interesting. I never thought about this. Thank you for the information. Open a PR if you wish. :-) |
@moshez I tend to follow what it says on the code-of-conduct.md and contributions.md first if the repo has them (generally opening an issue and getting a task, so far), else I do the same. The only difference is when I'm doing more than one commit, then I prefer to draft the PR pending review, some repos seem to lose track of what they merge easily. I found that doing this is the minimum I can do to show respect for their work. It's still a bit confusing at times to understand how each repo works, this seems to be making it more relaxed and pleasant for everyone, at least for the time being... |
Hi! I wanted to discuss this before opening a PR.
This is not the workflow I use, and not the one I would recommend. If you do this, your
master
branch will fall behind upstream master, and you will have to play tricks to update it which are, in general, a pain and give little value.Instead, I reverse the step.
I
git clone
from upsteam:git clone git@github.com:catalinpit/OSS-Contribution.git
.I create the branch with
git checkout -b my-branch
, and do whatever changes I need.Only then do I fork, and then add a new remote:
git remote add mine git@github.com:moshez/OSS-Contribution.git
Then, I push the changed branch to mine:
git push --set-upstream mine my-branch
(After that I open a PR as detailed currently).
What is the advantage?
Often, it will take some time for your PR to be considered. This means that one of the comments you might get is "your code is out of date with master". In that case, you just
With the suggestion you have here, you would need to add a new remote
upstream
, and then either push changes from master to upstream, orgit rebase my-branch upstream/master
, neither of which are that intuitive.The text was updated successfully, but these errors were encountered: