Hi there,
So I’m trying to contribute an small enhancement to ansible.
That you can find it here:
https://github.com/nicocesar/ansible/commit/f03b1ce59e2581a105e27afb4e776333ac29cb56
but my pull request isn’t the cleanest one:
https://github.com/ansible/ansible/pull/8434
I still need to get better skills on github forking and merging and stashing. Could someone give me a hint what should I be doing? I was about to destroy my nicocesar/ansible copy and create a new fork just for this pull request. It’s like using a cannon for a mosquito. Hints?
Thanks in advance,
Nico
Hi Nicolas,
The first rule of PR club is to always make changes on a separate branch, and not the main devel branch, like you did now. If you follow that, you’ll notice you won’t run as quickly in trouble.
When you want to update that branch, don’t do merges, but rebases (‘git rebase devel’ from your feature branch instead of ‘git pull’)
From your repo, with your patch now on devel, follow these steps:
(this is from the top of my head…! I’m not responsible if you kill any kittens!)
- git checkout -b version_check
now, you have a copy of your work in this separate branch
- git reset --hard
[f03b1ce](https://github.com/nicocesar/ansible/commit/f03b1ce59e2581a105e27afb4e776333ac29cb56)
get rid of the merge commits and keep just a feature branch
git fetch origin
git checkout devel
git reset --hard origin/devel
(or instead of origin whatever you called the ansible upstream remote)
- git checkout version_check
git rebase origin
git push origin --set-upstream version_check
Now do a new PR from this branch.
HTH,
Serge
Serge, Thanks so much or your time and the detailed explanation …
Didn’t worked out of the box, but for sure it helped to get what I wanted.
Please do a check to my new pull request:
https://github.com/ansible/ansible/pull/8434
Should be correct.
BTW, had to do a pull --force in order to make the changes that I wanted on github.
Thanks again,
Nico
FYI: The above looks like it may be a link to the previous pull request still.
Thanks!
Looks like you may need to rebase this one. I suspect you may be rebasing against your branch and not upstream, which is why it appears to still have a conflict.