github个人主页
在github上创建自己的个人主页,创建过程中遇到的一些问题记录一下
1.首先安装github桌面版,并在github上创建相应的工程,直接new repository即可
2.选择需要上传的文件夹git bash here
3.依次执行下述命令
git remote add www https://github.com/xxxx/xxxx.git这条命令的网址,为下图画住的部分

git remote add www https://github.com/xxxx/xxxx.git 其中www为连接名字,可以随便取
git init git add . git remote add www https://github.com/xxxx/xxxx.git git push -u www master
此时就可以在下图看到两个分支了,接下来要做的就是合并两个分支的内容
4、合并分支
git checkout main
结果报错,发现没有那个分支
于是先获取一下,执行一下命令发现有了main分支
git fetch
#切换分支 git checkout www/main #创建并切换分支 git checkout main #将分支进行关联 git branch -u www/main main #将远程分支拉去到本地 git pull #合并分支 git merge master --allow-unrelated-histories #将分支内容推到远程 git push www main
至此,两个分支合并完毕
然后在仓库中找到settings,然后找到Page,通过画住的连接加上要访问的首页文件,即可访问到相应的文件
参考链接:
https://blog.csdn.net/weixin_43274923/article/details/106840808
(24条消息) github 显示HTML页面方法_guokanglun的博客-CSDN博客_github html
(24条消息) github合并master和main_RazerZhang的博客-CSDN博客_github main和master
(24条消息) Git分支之master合并到main_亚林瓜子的博客-CSDN博客_master合并到main
分享每一天-git将master分支的代码合并到main (seedblog.cn)
(24条消息) error: pathspec ‘main‘ did not match any file(s) known to git_LinDaiuuj的博客-CSDN博客