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 提交

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

  • 相关阅读:
    HDU-4726 Kia's Calculation 贪心
    HDU-4725 The Shortest Path in Nya Graph 最短路
    HDU-4722 Good Numbers 数位DP
    HDU-4720 Naive and Silly Muggles 圆的外心
    golang-mysql
    golang web
    golang接口
    golang对象
    亲测可用的golang sql例程与包管理
    golang-练习3
  • 原文地址:https://www.cnblogs.com/laijinquan/p/9197869.html
Copyright © 2011-2022 走看看