Git的使用记录
Git的使用记录

Git的使用记录

  • 初始化
git init
git add -A
git commit -m "first commit"
git remote add origin https://.git
git push -u origin master
  • 改源
git remote set-url origin https://gitee.com/xxxxx/xxxxx
  • 上传
git add -A
git commit -m "本次提交的提示文本"
git push
  • 同步到本地
git pull
  • 清空本地文件夹git配置
删除.git文件夹
  • 清空全局账户信息
git config --system --unset credential.helper
  • 清除本地修改,以便拉取云端代码
git reset --hard
git clean -xdf
  • 创建 git 仓库
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://gitee.com/xxxxx/xxxxx.git
git push -u origin master
  • 本地已有项目合并到仓库
git remote add origin https://.git
git push -u origin master

IDEA能一键识别git项目