hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.43k stars 4.85k forks source link

Branch master set up to track remote branch master from #2570

Closed mcfly001 closed 7 years ago

mcfly001 commented 7 years ago

Environment Info

Node version(node -v): 6.10.2

Your theme _config.yml (Optional): spfk

Hexo and Plugin version(npm ls --depth 0): 1.0.2

For BUG

image

For question

when i push my change to github , i enter " hexo -d " but it tell me 'Branch master set up to track remote branch master from .' ,how can i resolve this

NoahDragon commented 7 years ago

Could you please delete the .deploy_git folder and redeploy?

mcfly001 commented 7 years ago

i have try it ,but it's also not work

NoahDragon commented 7 years ago

Could you please post the git deploy setting in config file?

seaoak commented 7 years ago

@mcfly001 Apparently from your screenshot and your GitHub repository, I think that you might set the repository "zyj-github.io" as your GitHub Pages source.

If it is true, you can change the "repo:" field in your _config.yml as follows:

-   repo: git@github.com:mcfly001/zyj.github.io.git
---
+   repo: git@github.com:mcfly001/zyj-github.io.git

Use a hyphen instead of a dot.

seaoak commented 7 years ago

Just for the record:

  1. A log message "Branch master set up to track remote branch master from REPO" shows that a git operation (git push -u REPO HEAD:master --force) is successfully completed. So hexo -d command is normally ended.

  2. If you will change the name of destination repository and keep its history continuously, you can change the local git repository configuration as follows:

    $ cd .deploy_git
    $ git remote set-url origin git@github.com:USERNAME/NEW-REPO-NAME.git

    Because GitHub automatically redirects all access to new repository, no error occurs for access to old repository. But some warning messages may be displayed such as in this case. To avoid these warning messages, you can use above procedure.

mcfly001 commented 7 years ago

all of this i have try ,but it's also not work,i will try change the repository

NoahDragon commented 7 years ago

@mcfly001 does this issue resolved?

mcfly001 commented 7 years ago

yes it's resolved ,but i don't know why

NoahDragon commented 7 years ago

@mcfly001 great. I will close this issue for now.