i have got completely lost trying to use git/github to contribute code, and need help:
I have a github account with an openemr fork (ruthkonyn/openemr), and git on my local linux machine. I have two branches, one for the gad7 form ‘donate to OpenEMR’, and one for a new client report ‘reports’ (not the best names i admit).
after some confusing times I did what i thought would get everything up to date on my local machine for my new branch ‘reports’
git checkout master
git pull upstream master
git checkout reports
git rebase master
git push origin reports - this failed “failed to push some refs to git@githumb.com:ruthkonyn/openemr”
git push origin +report
previously i had done a fetch when I was on my github fork and it was reporting that it was behind a number of changes on the master (was this a mistake?)
I think i also committed the cardinal sin of committing some code in my local master, which i’ve tried to revert.
I then made some final changes to a report file, commited locally and pushed to my remote. I then went onto my github repo, went to the ‘reports’ branch and did a PR. Then things started to get weird - as well as the two files needed for the new report, it included the deletion of a gad7 file (from the other branch) and it seemed to include the rebase that i’d done locally. This PR is in ‘reports #5553’, together with PRs i did some months ago.
i am trying a second time, this time i’ve halted docker on my local machine before doing the PR
tests are now being done. some have passed, one styling test on the report php file failed, i corrected the errors locally, commited and pushed. The next test is:
Test / PHP 7.4 - Apache - MariaDB 10.6 (pull_request) In progress — This check has started…
It has been running for about three hours, together with a number of similar tests. The tests i’ve looked at are all in the final stages of ‘complete job, cleaning up orphan processes’
so this gives you an idea of what a muddle i’m in.
also there’s a PR i made about two months ago which finally passed all the tests but has been in the state ‘merging is blocked’ - it’s ‘Donate to OpenEMR #5209’
I think i committed a cardinal sin of doing a commit in my local master some time ago - i’ve tried to revert those commits, but i have a suspicion this is causing all my troubles.
my gut instinct is to try to delete all my stuff on github and start affresh with a new fork and a new local ‘openemr’ git master with no branches, to create the two branches, commit the new code etc. i.e. start all over again. but if anyone could hold my hand and get me into a state where things are working, and I understand what’s happening, i’d be most, and eternally, grateful
many thanks, ruth