git 基础操作入门

git配置

git config
git config –global user.name “John Doe”
git config –global user.email johndoe@example.com
git config –global core.editor emacs
git config –list
git config user.name

从远程仓库拿数据下来

git clone git://github.com/schacon/grit.git mygrit

远程仓库其他

  • 查看远程仓库
    git remote -v
  • 查看远程仓库信息
    git remote show [remote-name]
  • 远程仓库的重命名
    git remote rename A B
  • 添加远程仓库
  • git remote add [shortname] [url]
  • 移除远端仓库
    git remote rm
  • 从远程仓库抓取数据
    git fetch [remote-name]
  • 推送到远程仓库
  • git push [remote-name] [branch-name]

简单的git操作:无脑版

  1. 首先先把自己的git参数配置配置好
  2. 再远程clone一个项目下来
  3. 本地对文件操作

    • 文件修改,这与git无关
    • 文件添加到暂存区,git add filename
    • 文件提交git commit -a -m description
  4. 把修改完的项目再提交到远程仓库中
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值