ubuntu - Upload files from webserver to GitHub -


i wondering if possible to, via git, copy files webserver github repo start editing github?

thanks

if mean want copy files directly webserver github, no, not possible git alone. while straightforward shell scripting, recommend try manually now.

first, create new repository on github - following documentation walk through this: https://help.github.com/articles/create-a-repo/.

then can clone computer! - https://help.github.com/articles/cloning-a-repository/

download copy of current webserver files - html, css, js (if any), images, etc, whole shebang, make sure don't have passwords or other secrets in there.

copy webserver files folder created when cloned repository.

now, need add files "index" (also called staging area or cache), , commit them repository. this, open terminal, cd cloned repository folder, , run:

git commit -am 'initial commit' 

lastly, push changes github:

git push 

done! (but read below...)

i suggest having @ github pages https://help.github.com/articles/what-is-github-pages/. if used github pages, each time git push new changes github, website update automatically. whereas if follow answer above, need reupload website webserver each time want update.

a note editing files on github:

while github has great text editor inbuilt web interface, use simple changes - correct spelling mistakes, grammar, etc. when want make changes html, css, or code in general, best use text editor designed coding (like atom) on computer, , push changes github git push.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -