Git Product home page Git Product logo

git's Introduction

vim .gitignore 输入node_modules/ 按下esc过滤文件 要点个i不然是不能输入的 过滤.Ds_store/ 然后shit加:然后输入wq git init

终端命令行 .gitignore//这个是git仓库过滤文件(过滤不需要提交的文件或者文件夹) git init 初始化一个git仓库

git status //查看当前仓库的状态

git add //把需要提价文件添加到本地缓存

git add . //可以把所有的提交文件缓存到本地中

git commit - m '提交信息’ 把本地缓存中的文件提交到本地仓库

git branch 分支名 //创建一个新分支

git checkout 分支名 //切换到指定的分支

git branch -d 分支名 //删除一个分支

git log//查看日志 git log - -graph —pretty =oneline //加入一些美化和图形的命令

git reset logid --hard //回退到指定的一次提交

git tag tagName 为代码打标签.标签可以进行切换和直接发布

git log --graph --pretty=oneline --abbrev=commit 查询所有上传内容 nam init

add package.json

git status //查看文件目录

git log --graph --pretty=oneline --abbrev=commit 查看 提交完成的git 请求

git reset logic 编码 --hard //回退到指定的一次提交

git tag tagName 为代码打标签.标签可以进行切换和直接发布

esc wq 回车

** 远程服务器相关操作**

  1. git clone git链接
  2. git pull origin master:master > //把远程分支代码拉取合并到本地的master分支
  3. git push origin master:master //把本地的Master分支推送到服务器的master分支
  4. git clone 远程服务器地址 //把远程服务器的代码clone到本地
  5. git branch //查看当前分支名

git's People

Contributors

chaodidi avatar

Watchers

James Cloos 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.