first thing first, install github on ur mac or pc and sign up github
Sign in github and create a new project repository.
Now, one can use command to pull/push files from/to github
commands:
git clone <github-repository-url> : this link up github repository. a new folder with files in respositiory will be created.
git status - show diff btw client and server copy
git add <filename> - add local file to repository (not yet upload to github at this stage)
or use
git add -A : it will add all files to repository.
git commit -m "message about this commit" - this will commit the changes so far, kind of lock
git push – sync to github
git pull - pull files from github (this command only work in github folder)
沒有留言:
張貼留言