CALIPSO-project / SPINacc

A spinup acceleration procedure for land surface models (LSM)
4 stars 0 forks source link

How to synchronize codes #9

Closed YilongWang closed 3 years ago

YilongWang commented 3 years ago

When I improve the codes and make tests on obelix, they are not automatically updated here. I need to remember all the changes made and type them here line by line, this is annoying when significant changes are made... I am wondering is there any easy way to synchronize the changes I make on obelix?

yyhuang2016 commented 3 years ago

I used github several years ago, but not an expert. I remembered github has ways to commit your local changes. Something like git push xxx. Please have a check on the post https://docs.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line. I did not test the code. The point is that you could find similar online tutorial on committing your local changes. I did remember when I was working with github, I had quite a lot of issues with tokens

On Wed, Mar 17, 2021 at 2:25 PM YilongWANG @.***> wrote:

When I improve the codes and make tests on obelix, they are not automatically updated here. I need to remember all the changes made and type them here line by line. I am wondering is there any easy way to synchronize the changes I make on obelix?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dsgoll123/SPINacc/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/AES5ZVVTKC37Z3VVO5YSKNLTEAOI5ANCNFSM4ZJYLQJQ .

-- Dr. Yuanyuan Huang Ecosystems and biogeochemical modeling CSIRO Climate Centre 107 Station Street, Aspendale, Victoria 3195, Australia Tel: +61 460 652 635

obfiscator commented 3 years ago

Hi,

Yes, I believe you need to do multiple steps.

First, "git add" to add all the files that you changed.

Then, "git commit" to commit them to your local copy (a difference between svn and git and is that git has a local copy that you commit to).

And then, "git push" to push them to the master repository (here).

This might help: https://git-scm.com/docs/gittutorial

obfiscator commented 3 years ago

A few other useful things that I've found.

"git diff" will show you all the changes you have made. "git pull" will update all your local files with what exists in the master code (here). "git status" will show you what files have been modified.