zoukankan      html  css  js  c++  java
  • git学习

    一、使用git提交自己的项目

    基本命令:

    初始化文件 git init

    添加版本控制 git add .

    提交本地 git commit -am "注释'

    提交代码到远程  git push

    拉取远程代码 git pull

    日志 git log

    回退 git reset --hard 2ab4fdd

    历史提交记录  git reflog

    分支 git branch

    获取最新版本 git  checkout

    设置用户名 git config --global user.email luna.wang@wolaidai.com

    二、下载已经存在的项目

    (1)使用可视化工具:

    建一个空文件,右键选择git bash here唤起命令台

    拉取代码,在网页上拷贝ssh的路径,git clone下载了主干的代码

    cd   xxx 进入工程目录

     

    git checkout -b dev   本地创建分支dev(远程不存在)

    修改代码分支代码

    提交分支  git push  git目录   本地:远程   

    git checkout -b origin/branch-why 本地没有分支,远程有分支,拉取远程分支到本地

     三//在idea中的使用

    1、在idea中获取新的分支

    在cvs中找到git fetch

    2、拉远程分支到 idea 

    选择checkout as,保存本地

    四/使用小乌龟

    使用swith/checkout检出分支

    然后查看log,判断提交了什么

  • 相关阅读:
    HDU4452——模拟——Running Rabbits
    URAL1711——模拟——Code Names
    URAL1721——匈牙利算法——Two Sides of the Same Coin
    Codeforces Round #FF (Div. 1)——A贪心——DZY Loves Sequences
    Codeforces Round #326 (Div. 2)
    URAL 7077 Little Zu Chongzhi's Triangles(14广州I)
    Codeforces Round #325 (Div. 2)
    位运算 UEST 84 Binary Operations
    LCA UESTC 92 Journey
    Codeforces Round #324 (Div. 2)
  • 原文地址:https://www.cnblogs.com/wanghongye/p/9187190.html
Copyright © 2011-2022 走看看