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
.gitfolder into the SRCFOLDER
$ SRCFOLDER git init<br />
- Add the files into the git.
$ SRCFOLDER git add *.*<br />
- Commit the files into git. The files will be committed with HEAD as
$ SRCFOLDER git commit -m "initial commit"<br />
- 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
- 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
.gitfolder. It gives a name
originto the remote source.
$ SRCFOLDER git clone https://www.github.org/sumprain/XXX<br />
- 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<br />
- In case of modification of contents in the SRCFOLDER,
committhe changes and then run another