Git 简单操作(拉取,推送 ,合并分支,切换分支)

10 篇文章 0 订阅
7 篇文章 0 订阅

Git 简单操作(拉取,推送 ,合并分支,切换分支)


一.git一些简单代码合并命令

1.git status  查看状态
2.git branch - a  查看分支
3.git checkout master  切换master分支
4.". git add" and/or "git commit -a” and/or “git add .” and git commit -m “xx”  提交修改内容
5.git pull 拉取
        6. git merge niejia  合并分支
7.git push origin master 推送到master 分支

二.git操作扩展

原文:

          usage: git [--version] [--help] [-C <path>] [-c name=value]

           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]

           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]

           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]

           <command> [<args>]


The most commonly used git commands are:

    add        Add file contents to the index

 bisect     Find by binary search the change that introduced a bug

    branch     List, create, or delete branches

    checkout   Checkout a branch or paths to the working tree

    clone      Clone a repository into a new directory

   commit     Record changes to the repository

     diff       Show changes between commits, commit and working tree, etc

     fetch      Download objects and refs from another repository

    grep       Print lines matching a pattern

     init       Create an empty Git repository or reinitialize an existing one

     log        Show commit logs

    merge      Join two or more development histories together

     mv         Move or rename a file, a directory, or a symlink

     pull       Fetch from and integrate with another repository or a local branch

     push       Update remote refs along with associated objects

     rebase     Forward-port local commits to the updated upstream head

    reset      Reset current HEAD to the specified state

    rm         Remove files from the working tree and from the index

    show       Show various types of objects

    status     Show the working tree status

    tag        Create, list, delete or verify a tag object signed with GPG


'git help -a' and 'git help -g' list available subcommands and some

concept guides. See 'git help <command>' or 'git help <concept>'

to read about a specific subcommand or concept.


翻译:

最常用的GIT中的命令是:

    添加文件的内容添加到索引

    通过平分二进制搜索查找引入了错误的变化

    分支列表,创建或删除分支机构

    收银台结帐分支或路径工作树

    克隆克隆一个仓库到新目录

    提交记录更改库

    提交之间差异显示修改,提交和工作树等

    从另一个存储库获取下载对象参

    匹配模式的grep打印线

    初始化创建一个空的Git仓库或重新初始化一个现有的

    日志显示提交日志

    合并连接两个或更多的发展历程在一起

    MV移动或重命名一个文件,目录或符号链接

    从拉取,并与另一个仓库或当地​​分支机构整合

    推更新远程裁判以及相关对象

    衍合转发端口本地提交更新后的上游头

    RESET复位当前磁头到指定的状态

    RM从工作树从索引中删除文件

    节目显示各种类型的对象

    状态显示工作状态的树

    标签创建,列表,删除或验证与GPG签署了标记对象


“git的帮助-a”和“git的帮助-g名单可用的子命令和一些

概念指南。见'git的帮助<命令>“或”git的帮助<概念>“

阅读有关特定子命令或概念。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值