zoukankan      html  css  js  c++  java
  • git常用命令

    常用命令

    #设置
    git config --global user.name="user"
    git config --global user.email="user@email.com"
    
    #与服务器交互
    #从服务器克隆
    git clone https://github.com/e--/prj.git
    git remote add origin https://github.com/e--/pri.git
    git clone origin
    git remote set-url origin https://github.com/e--/pri.git
    #从服务器下载
    git fetch origin
    git merge origin/master
    git pull
    #上传到服务器
    git push origin master
    
    #本地
    git status #查看状态
    git log #查看提交历史
    git add #添加
    git add .
    git comment #提交
    git comment -m "first commit"
    git comment -a -m "second commit"
    git checkout -b xxx #建立branch xxx,并切换到xxx,等于git branch xxx; checkout xxx;
    git branch -d xxx#删除branch xxx
    git branch --merged
    git branch --no-merged
    git stash #暂存
    git stash list
    git stash apply #使用暂存
    git stash drop
    git commit -amend
    git filter-branch
  • 相关阅读:
    Unity3D热更新
    js
    xshell安装运行时提示缺少mfc110.dll
    Linux 分区的概念
    js
    Web 安全测试
    php 获取客户端的浏览器信息
    H5 获取地理位置
    JS -判断、监听屏幕横竖屏切换事件
    css 禁用移动端部分特性
  • 原文地址:https://www.cnblogs.com/zhizhou/p/3639483.html
Copyright © 2011-2022 走看看