Git 一般性操作
- 前端
- Stella981
- 0
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
免责申明:本站发布的内容(图片、视频和文字)以转载和分享为主,文章观点不代表本站立场,如涉及侵权请联系站长邮箱:xbc-online@qq.com进行反馈,一经查实,将立刻删除涉嫌侵权内容。