Giter VIP home page Giter VIP logo

gitscene's Introduction

GitScene

用于测试多种使用Git的场景

  • git config user.name:查看用户名

  • git config user.email:查看邮箱

  • git config user.name 用户名:查看用户名

  • git config user.email [email protected]:配置邮箱

  • git clone "":克隆指定地址的仓库

  • git pull:拉取代码

  • git branch:查看本地分支

  • git branch -a:查看所有分支

  • git branch -r:查看远端所有分支

  • git checkout -b dev:创建并切换到dev分支

  • git branch dev:创建dev分支

  • git checkout dev:切换到dev分支

  • git fetch:把远端更新同步到本地,一般可用于把把远端的分支变动同步到本地

  • git commit -m "":提交信息

  • git commit --amend:重写提交信息

  • git commit --amend --no-edit:把本地新增的改动同步到上一个commit中

  • git push:把本地提交推到远端

  • git remote -v:查看远端仓库地址详情

  • git revert commitId:撤销指定的commitId的提交

  • git cherry-pick 指定commitId:一般用于把其他分支的提交cherry到当前分支上

  • git merge:分支合并

  • git rebase:变基,可用于把当前分支的commit的基底变为其他分支最新commit,还可用于把一些commit做合并

  • git stash:暂存,可用于切换分支前把本地修改先暂存起来

  • git stash pop:把暂存信息pop出来

  • git checkout 指定文件:放弃指定文件的修改

  • git checkout .:注!!放弃所有未commit的改动,不熟悉此命令时慎用

gitscene's People

Contributors

twototwoto avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.