步骤
- git创建仓库
-
• 本地初始化 git init • git add . • git commit -m "commit" • git remote add origin https://github.com/XXX/xxx.git • (第一次跳过此步,该步用于更新)git pull --rebase origin master • git push -u origin master
问题
- fatal: 无法访问 'https://github.com/a-lizi/-.git/':Could not resolve host: github.com
git config --global --unset http.proxy 或 git config --global --unset https.proxy
- 鉴权失败
原因:未设置token或token过期
解决:页面右上角点击你的头像,然后点击 Settings-在左侧边栏中,点击开发人员设置-访问令牌-设置-以令牌为密码再次push