-
Create a Github account
- Go to Github and create your account.
-
Download Git bash tool
- Download Git bash for windows on Git-scm.
- Install the Git-1.9.4-preview20140611.exe using default settings.
-
Configure the SSH connection with remote github
- Start the Git Bash and create SSH keys
ssh-keygen -t rsa -C "[email protected]"
Create privite and public keys for the Email account
* Record the file **id_rsa.pub** in direcotry **.ssh**
-
Setting the Github website
- Account Settings -> SSH keys -> Add SSH key
- Paste the content of id_rsa.pub to the window.
-
Setting the local git
- Run the following command lines
git config --global user.email "[email protected]"
git config --global user.name "bakerwm"
- Test your SSH connection to github
ssh -T [email protected]
-
Create an empty repo on Github website: [eg: test-temp]
-
Initiate the git bash
git init
\\ Move your files to the current directory
git add <your files>
git commit -m 'Initial my project'
git remote add origin [email protected]:bakerwm/test-temp.git
git push -u origin master
- Record the name of web repo: [eg: hello]
- Clone the web repo to local PC and update your files
git clone [email protected]:bakerwm/hello.git
Create local files
git add <local files>
git commit -m 'add new files'
git push
- cd to your directory
- update your files to web repo
git add <your files>
git commit -m 'update files'
git push origin master
Just try the following command: git pull
- Create a repo in your github website: "3Kings4Food"
- Clone the repo to your local PC
- Create a special Github Pages branch
git checkout --orphan gh-pages
It will create a new branch, and saying Switched to a new branch 'gh-pages'
git checkout gh-pages
It will check whether you are in the branch "gh-pages"
- push your files to the new branch for the first time
git add files
git commit -m 'update my files'
git push --set-upstream origin gh-pages
- You can view your page at: http://bakerwm.github.io/3Kings4Food Use HTTP to access the website, NOT HPPTS.
Some useful guides for creating Gitpages: **1. http://www.thinkful.com/learn/a-guide-to-using-github-pages/ **2. http://24ways.org/2013/get-started-with-github-pages/