Link Search Menu Expand Document

Remote » Local

Basic command to get started

Cloning repo in to PC folder

git clone https://github.com/USER/REPO.git

Using SSH or HTTP > * git fetch https://github.com/USER/REPO.git

git fetch ssh://[email protected]:USER/REPO.git

Fetch_head

git checkout FETCH_HEAD -- index.html

Fetch first

You may see error message like this:

! [rejected]        gh-pages -> gh-pages (fetch first)
error: failed to push some refs to 'https://github.com/USER/repo.git'

Under the same directory, do:

git remote add origin https://github.com/USER/my-repo-name.git
    #You might see this: error: remote origin already exists.
    #Ignore and run the next command
git pull origin gh-pages