Friday, 18 January 2013

Using git with github

I have several git repositories at on the github website, including the source of my webpage on using R for time series analysis, "A Little Book of R for Time Series".

Whenever I need to update the webpage, I need to remember how to update it using git, I need to use the following commands (which I find quite hard to remember!):

% cd LittleBookofRTimeSeries    
[go into the directory containing my repository, on my laptop]

% git add src/timeseries.rst           
[tell git that I have edited timeseries.rst and want to update it] 

% git commit -m 'updated plotForecastErrors' 
[give git a message describing the update I made]

% git push origin master             
[send the change to github]

Additional changes can be made by just using 'git add', 'git commit', and 'git push origin master'.
Not so complicated after all!

No comments: