进入git bash
git config --global user.name ‘仓库名‘
git config --global user.email ‘[email protected]‘
git clone https://github.com/c-y-q/test001.git
修改文件内容
git status
git diff
git add . (或者指定文件名字)
git push ,很有可能报错:
执行:
git remote add master https://github.com/c-y-q/test001.git
git push -u test001 master 还报错,执行以下
git push --set-upstream origin master //会弹出输入用户名密码的框框,
git pull origin master
提交代码:git add .
git commit -m "fisrt"
git push
创建并切换分支:git checkout -b dev
查看分支:git branch
修改dev分支并提交: git push --set-upstream origin dev
合并dev分支到master:1.先切换到master分支:git branch master ,git merge dev
删除dev分支:git branch -d dev
原文地址:https://www.cnblogs.com/qiyc/p/9873956.html
时间: 2024-10-11 16:28:36