git命令简单的入门操作

  • 内容
  • 评论
  • 相关

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地址




本文标签:

版权声明:若无特殊注明,本文皆为《菜鸟站长》原创,转载请保留文章出处。

本文链接:git命令简单的入门操作 - https://wlphp.com/?post=353

发表评论

电子邮件地址不会被公开。 必填项已用*标注