Git 一般性操作

僤鯓⒐⒋嵵緔 提交于 2020-02-15 05:43:19

git全局设定

git config --global user.name “码云账号” 
git config --global user.email “码云注册邮箱”

git 定位文件夹
cd进入到需要同步的文件夹线面

git init

上传到git

git add .
git commit -m '上传标记'
git push 

没有项目代码的情况下创建 git 仓库:

mkdir GitHelloWorld //新建一个GitHelloWorld文件夹,本地git仓
cd GitHelloWorld //切换到项目路径下
git init //git初始化
git commit -m "first commit" //提交并注释
git remote add origin https: //git.oschina.net/你的码云账号/GitHelloWorld.git
git push -u origin master //上传到码云git 远程仓

切换分支:

git checkout index-swiper
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!