git config --global user.name "name" git config --global user.email "fmail.com"
git clone http://。。。。。。.git cd im3.1-product-netcore touch README.md git add README.md git commit -m "add README" git push -u origin master
cd existing_folder git init git remote add origin http:.......git git add . git commit -m "Initial commit" git push -u origin master
cd existing_repo git remote rename origin old-origin git remote add origin http:.......git git push -u origin --all git push -u origin --tags分支操作git branch 分支名称
git add . git commit -m '提交的备注信息' git push -u origin dev
git checkout master
git pull origin master //如果是自己一个开发就没有必要了,为了保险期间还是pull
git merge dev
git status On branch master Your branch is ahead of 'origin/master' by 12 commits. (use "git push" to publish your local commits) nothing to commit, working tree clean //上面的意思就是你有12个commit,需要push到远程master上 > 最后执行下面提交命令 git push origin master
更新远程分支列表 git remote update origin --prune 查看所有分支 git branch -a 删除远程分支Chapater6 git push origin --delete Chapater6 删除本地分支 Chapater6 git branch -d Chapater6