Publishing in GitHub

April 17, 2014
By

[This article was first published on MATHEMATICS IN MEDICINE, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Publishing in GitHub

Publishing in GitHub

I struggled to make my first repository in GitHub. I finally found out the steps to do so.

  • Make your folder in local host and add the required files in the folder (SRCFOLDER). One of the required files is README.md, which will contain overview of the project.
  • Add git to the SRCFOLDER. It will make a .git folder into the SRCFOLDER
$ SRCFOLDER git init
  • Add the files into the git.
$ SRCFOLDER git add *.*
  • Commit the files into git. The files will be committed with HEAD as master.
$ SRCFOLDER git commit -m "initial commit"
  • Make new repository in GitHub. It should be totally empty (sumprain/XXX).
  • Copy the https address of GitHub repository obtained from the right bottom of the repository page. It is https://www.github.org/sumprain/XXX.
  • Clone the GitHub repository into SRCFOLDER. Cloning creates a copy of GitHub repository into SRCFOLDER as SCRFOLDER/XXX, and will have all the contents of the XXX into it including a .git folder. It gives a name origin to the remote source.
$ SRCFOLDER git clone https://www.github.org/sumprain/XXX
  • Push the contents of the SRCFOLDER into the sumprain/XXX. It will copy the contents of SRCFOLDER into sumprain/XXX.
$ SRCFOLDER git push origin master
  • In case of modification of contents in the SRCFOLDER, commit the changes and then run another push.

Thanks.

To leave a comment for the author, please follow the link and comment on their blog: MATHEMATICS IN MEDICINE.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)