GithubHelp home page GithubHelp logo

gittest's Introduction

gitbash:

git config --global user.name "Your Name" # 设置名字
git config --global user.email "[email protected]" # 设置邮箱
git add xxx.xxx # 把文件xxx.xxx添加到仓库缓存区
git commit -m "本次提交的说明" # 将缓存区的所有文件正式提交到仓库
git log # 查看版本情况:过去所有修改时间、修改人、修改内容
git reset --hard HEAD^ # 把当前版本回退到上一个版本,HEAD^^表示上上个版本,往上100个版本HEAD~100
git reset --hard xxx # 回退到某个版本,xxx表示版本commit id
git reflog # 显示过去的每一次命令
git init # 把该文件夹变成Git可以管理的仓库
git remote add 远程库的名字 远程库地址 # 将本地仓库与远程库联系起来
git push -u 远程库的名字(默认为origin) master # 第一次推送master分支的命令
git push origin master # 推送到远程库
git clone 远程库地址 # 克隆远程仓库
git fetch --recurse-submodules 远程库地址 # 断点续传
git add . # 将该目录下所有文件夹及文件提交到暂存区
ls # 查看待上传文件夹的内容
git pull --rebase origin master # 把最新版本的远程仓库源码更新到本地(往往是不可缺失的步骤)

git add 的几种参数的区别:
git add -A # 保存所有的修改
git add . # 保存新的添加和修改,但是不包括删除
git add -u # 保存修改和删除,但是不包括新建文件

git status # 文件,文件夹在工作区,暂存区的状态
git remote -v # 查看关联远程库的本地库
git mv 源文件 目标文件 # 同linux命令 mv 可以改名

gittest's People

Contributors

pur5uer avatar

Watchers

 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.