PHP菜鸟博客_共同学习分享PHP技术心得【PHP爱好者】
git命令简单的入门操作
2022-7-7 菜鸟站长




Git 全局设置:



git config --global user.name "wlphp"

git config --global user.email "613154514@qq.com"



创建 git 仓库:



mkdir aliyun-fc-phpdemo

cd aliyun-fc-phpdemo

git init 

touch README.md

git add README.md

git commit -m "first commit"

git remote add origin https://gitee.com/wlphp/aliyun-fc-phpdemo.git

git push -u origin "master"



已有仓库?



cd existing_git_repo

git remote add origin https://gitee.com/wlphp/aliyun-fc-phpdemo.git

git push -u origin "master"





自己常用的命令

git  add  .      把所有加入暂存区

git commit -m '修复bug'   提交到本地仓库

git push -u origin "master"  推送到远程的master分支  origin只是个名字,对应git remote add   origin名字   url地址




















发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容