zoukankan      html  css  js  c++  java
  • Git基本操作和使用

    基本命令:

    git config
    git init
    git clone
    git remote
    git fetch
    git commit
    git rebase
    git push

    本地基本操作:

    git clone url    导入到本地

    git remote -v   查看源地址

    git status   查看改动文件

    git commit -am ‘备注’    提交源码

    git push origin master:master  确认提交

    git fetch 更新

    git rebase origin/master 合拼

    根据本地代码创建一个项目:

    git init  会自动创建一个.git文件

    使用 git status 查看变动

    添加:  git add 

                git statuss 查看变动

                git commit -am '备注'

    这个时候他会提醒 我们找不到源地址:

    添加源:

               git remote add origin url(这个url是你提交平台创建的) 

    然后在创建的提交平台上有什么文件是我们没有的,我们先更新:

               git fetch

    再合拼:

               git rebase origin/master

    然后就可以提交了:

               git push origin master:master 提交

    (注意,要先更新、合拼!!!)         

  • 相关阅读:
    正则笔记
    html5的选择器
    原生js操作dom备忘
    avalon使用笔记
    webpack2配置备份
    美女图片小爬虫,嘿嘿
    JS原型和继承
    localstorage sessionstorage cookie 备忘
    gulp配置文件备份
    node代码片段
  • 原文地址:https://www.cnblogs.com/laijinquan/p/9197869.html
Copyright © 2011-2022 走看看