zoukankan      html  css  js  c++  java
  • MAC终端下常用Git命令

    送给新手的简单命令操作、远程Git和local的同步实现流程:

    1、把git上的代码clone到本地

    $ git clone http:xxxx(地址,可以http也可以ssh)

    2、clone到本地以后、使用branch -a 查看远程所有分支

    $  git branch -a

    3、如若你有分支:master branch1 branch2 ,使用checkout用来切换分支。还可以用第2条指令去创建本地分支目录和远程的保持一致,并且切换远程分支到本地分支目录

    $ git checkout branch1

    $ git checkout -b branch1 origin/branch1 

    4、在本地修改完代码后、保存所有的项目

    $ git add .

    5、保存完成后可以提交到本地

    $ git commit -m '提交说明'

    6、最后提交git服务器,要加上分支的名字,默认master目录不加。

    $ git push origin branch1 

  • 相关阅读:
    linux virtualbox
    cboard安装
    test
    kafka安装
    OLAP解释
    php 连接数据库直接转成json格式
    hive学习
    mariadb修改密码
    mariadb anzhuang
    IDEA12 中写hql语句编译器莫名报错
  • 原文地址:https://www.cnblogs.com/wzbk/p/10307917.html
Copyright © 2011-2022 走看看