• Git 版本管理 add rm commit push pull


    $ git config --global user.name "Your Name"
    $ git config --global user.email "email@example.com"

    $ git remote add origin https://XXXX

    $ git init

    git add filename

    git commit -m "comment message"

    添加新内容

    git add

    git status

    git commit -m‘add something’ (add something为备注)

    git push

    删除文件(文件夹)

    git rm Date -r -f

    git commit -m'delete something'(delete somgthing 备注)

    git push

    branch

    git branch

    git branch new

    git push origin new

    git checkout new

    git branch -d new

    git branch -r -d origin/new

    git push origin :new

    clone 分支

    git clone -b develop https://git.XXX.git

    git add -A = git add . + git add -u

    • git add -A   stages All
    • git add .   stages new and modified, without deleted
    • git add -u     stages modified and deleted, without new

    git reset --hard FETCH_HEAD

    git pull

    Error:

    You are not currently on a branch.

    git checkout -b temp

    git checkout master

    git pull

  • 相关阅读:
    stm32启动代码分析
    STM32固件库详解
    ARM GCC CodeSourcery EABI下载地址
    Linux/redhat 基本网络配置
    侧边栏导航
    div滚动,页面不滚动
    自定义滚动条样式
    placeholder自定义CSS
    浏览器判断
    初始化页面垂直居中
  • 原文地址:https://www.cnblogs.com/fangchun/p/4639907.html
Copyright © 2020-2023  润新知