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

    >git常用命令整理,个别难的命令,结合git给的提示,多数可以搞定:
    git add . //提交所有改动文件
    git commit -m "change content" //说明改动内容
    git pull
    git push
    git push origin
    git branch -a
    git chekcout branchA
    git checkout -b branchNew
    git tag //查看tag
    git tag V1.1.0 //打tag
    git tag -d V1.1.0 //删除本地tag
    git push --tag //本地tag推送
    git push origin --tags //远程tag推送
    git log --decorate
    git push origin --delete tag V1.1.0 //删除远程tag

    >git 远程代码回退:
    git reflog
    git reset --hard commitId
    git push -f

    >git use:
    cd ~/.ssh
    ssh-keygen
    git config --global user.name "your username" //配置用户名
    git config --global user.email "your email" //配置邮箱
    git passphrase:"your password"

    >//git clone repo:
    git clone https://github.com/supnate/react-geek-time.git

    >把本地库的所有内容推送到远程仓库(GitHub新建好的库)
    git remote add origin https://github.com/begin256/webpack-learn.git
    git branch --set-upstream-to=origin/master master
    git pull --rebase origin master
    git push -u origin master

    >git pull = git fetch + git merge
    git pull --rebase = git fetch + git rebase
  • 相关阅读:
    小程序支付
    小程序传参
    git
    学习过程遇到问题的解决方法
    进程创建注意事项:函数及对应包
    进程创建:函数及对应包
    mac解决eclipse 端口占用问题
    暴力
    doc2vec
    Java正则表达式的解释说明
  • 原文地址:https://www.cnblogs.com/begin256/p/10614532.html
Copyright © 2011-2022 走看看