LOGIN
Harsha Alva
73
Community Expert
Mechanical Engineer + Software Developer (Project Leader)
 · MangaluruIndia
Share
Report
Get Link
TUTORIAL

Cloning into a new repo

Steps

  1. Clone from the project’s GitHub repo into <DIR> directory.
    git clone -b src --single-branch --depth=1 https://github.com/aharshac/aharshac.github.io.git <DIR>

 

  1. Change directory to <DIR>
    cd <DIR>

 

  1. Delete reference to the project’s GitHub repo.
    rm -rf .git

 

  1. Initialize new local git repo.
    git init

 

  1. Create a new repo on GitHub.com with the name <username>.github.io
    Refer https://help.github.com/articles/create-a-repo/

 

  1. Connect remote repo to local repo.
    git remote add origin <remote repository URL>

 

  1. Checkout new src branch.
    By design, GitHub Pages uses the master branch for site output.
    See https://help.github.com/articles/user-organization-and-project-pages/
    git checkout -b src

 

  1. Stage all files for commit.
    git add .

 

  1. Commit staged files.
    git commit -m "First commit"

 

  1. Push local files to remote.
    git push -u origin src
Contributions
Robert Lancer

Suggested a change from rm -R .git/ to rm -rf .git

3 likes 
Like
Award Contribution
Load 3 previous comments
Harsha Alva
73
Community Expert
Mechanical Engineer + Software Developer (Project Leader)
 · MangaluruIndia
Share
Report
Get Link

Ok. Will post that.

Like
0 like 
Award Contribution
Sai Prasad
23
Community Expert
Software Dev :) Let's build some dream ideas.
 · BhubaneswarIndia
Share
Report
Get Link

One doubt… Can github be used for deploying server side JS serving web apps??

Like
0 like 
Award Contribution
Ranjan Dailata
37
Community Expert
Application Architect/Lead Developer
 · ChicagoU.S.
Share
Report
Get Link

Sai Prasad No. Github is a version control repository. You may use Heroku or something to connect to Github repository and deploy code.

Like
1 like 
Award Contribution
Sai Prasad
23
Community Expert
Software Dev :) Let's build some dream ideas.
 · BhubaneswarIndia
Share
Report
Get Link

Thank you Ranjan Dailata 😃 … I had this doubt because github can be used as a static website host with .github.io subdomain and with jekyll it can be used as a CMS/Blog with flat file storage. So I had a confusion if we can has a NodeJS server …

Like
0 like 
Award Contribution
Ranjan Dailata
37
Community Expert
Application Architect/Lead Developer
 · ChicagoU.S.
Share
Report
Get Link

Sai Prasad Static web pages are fine. Folks do use it for documentation purpose. Github is not a Web or a App server. Some little tricks you can do with Github like having a static pages and making an Ajax call to render data. Here’s one example - http://pazguille.github.io/github-card/

Like
1 like 
Award Contribution
Sai Prasad
23
Community Expert
Software Dev :) Let's build some dream ideas.
 · BhubaneswarIndia
Share
Report
Get Link

Ranjan Dailata this is really cool way to use static website with dynamic content through ajax… loved it !! Going to try this … Thanks!

Like
1 like 
Award Contribution
Leave a reply...
DISCOVER
CHAT
ALERTS
DISCUSSIONS
FEED
New Post
Facebook Share
Share Link
Help