GIT tips and tricks

blankev wrote on Tuesday, November 13, 2012:

The string to the left is:

github/openemr-openemr-281d34a\openemr

git status

# on branchreferral change
nothing to commit(working directory clean)

bradymiller wrote on Tuesday, November 13, 2012:

Hi Pimm,
You are already publishing to your github repo. I was in the middle of making the list of commands with explanations (that is the best way to learn) to get your repo up and working correctly and to publish. Are you still using the openemr-1 repo? Do not recommend changing it or making a new one since you’ve already got the repo publishing.
-brady

bradymiller wrote on Tuesday, November 13, 2012:

Hi,
Too many cooks in the kitchen. I’ll back off and suggest you follow yehsters directions for now :slight_smile:
-brady

blankev wrote on Tuesday, November 13, 2012:

yester and brady,

you got me on the road. I will make a note of all commands you sugested and if this did work, just the minor change, I might be able to reproduce all your advises in the futuere…. I still feel very basic…… other word for stupid.

Tnx again, Pimm

yehster wrote on Tuesday, November 13, 2012:

# on branchreferral change nothing to commit(working directory clean)

Not sure what commands you executed, but at this point you are ready to make the code changes.
Edit the file you want to change, or copy the file from where you made the changes before into the file tree where your new branch exists.
Once you think you have the code changes in the “right place”

git diff

will confirm your edits
If the code looks the way you expect, then “commit”

git add . 
git commit -m "referral changes" 

This will commit the changes to your local repository

git log

will show you that the changes are being tracked

git push git@github.com:blankev/openemr-1 referral_change

will then push this branch to github.  (Depending on how you setup your github repo/password/public private keys, it may prompt you for a password at this point.)

blankev wrote on Tuesday, November 13, 2012:

Next question:

I thought I had a comparison of file to file mathc on my local OpenEMR Git Directory and the official 4.1.1. branch, but I have trouble finding it back in GitHub?

Any suggestions?

Tnx, Pimm

yehster wrote on Tuesday, November 13, 2012:

I can see your new branch on github, but it didn’t pick up your file changes.
You need to edit the file.  Re-read the steps in the first post of the second page.

blankev wrote on Tuesday, November 13, 2012:

I’ leave it for today. My changes are older than the branch, so I think I have to re-save them first, will continue tomorrow….

blankev wrote on Wednesday, November 14, 2012:

Yehster,

I followed all your instructions again and now it seems as if  I have accomplished. Don’t know yet what I did, but my changes seem to have been pushed into GitHub.

Please let me know if I failed again….

Tnx for the advise, Pimm

yehster wrote on Wednesday, November 14, 2012:

At this point, you have shared changes in the print_referral.php file.
https://github.com/blankev/openemr-1/commit/a4188add53b13e34ef6f3e1826ef4992161d9425?w=1
This is the only file you seem to have changed. 

blankev wrote on Wednesday, November 14, 2012:

There should be another file defining the label. At least there is a (1) file…… :wink: Now have to study why the file did and the other did not make it to the finals, but such is life.

Tnx, for the introduction into GitShell.

blankev wrote on Wednesday, November 14, 2012:

The naming of the label for the second line label_pt_clinic_id is more apropriate for the client. Before this change it had Clinic ID as a label.

Now there are two files. (Not much for OpenEMR but I had to start somwhere to get something into gitHub just had to learn even I could do this ;-))

bradymiller wrote on Thursday, November 15, 2012:

Hi Pimm,

Your github branch looks good. I placed some comments regarding your code on github.

-brady
OpenEMR