1. 本地创建新项目

git init
git add .
git commit -m "First commit"

2. 本地代码同步Push到远程仓库

git remote add origin "https://github.com/zwffff/ag.git"
git push -u origin master

3. push到远程仓库,出现“failed to push some refs to git"错误

git pull --rebase origin master

4. git pull --rebase origin master,出现“Cannot pull with rebase: You have unstaged changes."错误

git stash
git pull --rebase origin master

 5. 创建.gitignore忽略文件

touch .gitignore

 6. git 更改远程仓库地址

git remote rm origin
git remote add origin [url]

  

相关文章:

  • 2021-05-06
  • 2021-08-21
  • 2021-11-12
  • 2022-02-10
  • 2022-02-01
  • 2021-11-14
  • 2021-12-12
  • 2022-12-23
猜你喜欢
  • 2021-05-14
  • 2021-07-04
  • 2021-11-23
  • 2022-01-01
  • 2021-09-17
  • 2021-11-30
  • 2021-08-16
相关资源
相似解决方案