git使用 及其常用操作命令

初始化项目

  1. git init
  2. git add .
  3. git commit -m “first commit”
  4. git remote add origin git@github.com:bo0123/wechat_video2gif.git
  5. git push -u origin master
  6. git add .
  7. git commit -m “second commit” // 要用双引号
  8. git push

配置

git config --global user.email “915802070@qq.com”
git config --global user.name “bo0123”
ssh-keygen -t rsa -C “915802070@qq.com” (在git bash下) 系统会提示key的保存位置(一般是~/.ssh目录)和指定口令,保持默认,连续三次即可
然后vim打开id_rsa.pub文件,粘贴到github账号管理的添加SSH KEY界面中
git init 初始化本地仓库 (在git bash下) (D:\ProgramData\MiniProgramWorkspace\miniprogram)
git add “文件名” //用户添加文件
git add . //可以用来添加当前目录下的所有文件
git commit -m “first commit”
git tag 01知识点1
git tag 查看tag
https://github.com->>>>>>>New Repository
git remote add origin git@github.com:bo0123/LearnMiniProgram.git
git push -u origin master
git log
git reset 711ef2436b77bf3c4afdad2 (一部分哈希值即可)
git reset --hard 711ef2436b77bf3c4afdad2 (一部分哈希值即可)
git status
git push --tags
git clone https://github.com/coderwhy/LearnMiniProgram.git
git commit “filename”
git checkout tagname #切换版本
git clean -df
git clone 指定分支: git clone -b master https://gitee.com/liu21st/thinkphp.git

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值