Skip to content

Instantly share code, notes, and snippets.

@jzsn2018
Forked from tduarte/publish-ghpages.md
Created May 25, 2021 03:51
Show Gist options
  • Save jzsn2018/bac00a05ebe9bfd5cd705823871be7b5 to your computer and use it in GitHub Desktop.
Save jzsn2018/bac00a05ebe9bfd5cd705823871be7b5 to your computer and use it in GitHub Desktop.
If you need to force push an subtree
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@jzsn2018
Copy link
Author

git操作
在当前git项目中,将项目中的指定文件或文件夹提交到 强制 另外一个项目或者当前项目的另外分支中去

@jzsn2018
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment