使用git进行专业项目的线上仓库搭建
项目分支
将本地文件导入远程仓库
- git init
- git add 要push的文件夹或文件
- git commit -m ‘first commit’
- git remote add origin 仓库地址
- git push -u
git pull
出现冲突
git stash
git pull
git stash pop
合并分支
新建分支
git checkout -b new
回到指定分支
git checkout master
删除分支
git branch -d new
合并分支
合并指定分支到当前分支。
git merge new
git记住密码
git config --global credential.helper store