zoukankan      html  css  js  c++  java
  • git 简易使用指南

    du哦人开发项目,最常用的就是git。

    一.下载

    1.打开要从git获取的文件:右键git bash here

    2.开始下载文件:git clone http://....(git远程地址)

    3.切换分支:git checkout 分支名   //如果没有分支,执行 git checkout -b分支名,创建并切换到该分支   //在同一git远程库中,切换分支自动实现内容切换,不用再次git clone

    二.提交.

    1.先查看有什么不同; git status

    2.git add 红字 .(双击红字,ctrl+Ins复制,shift+Ins粘贴)

    3.git commit -m"备注信息"  //这一步还没有提交到远程库

    4.git push origin 分支名    提交到指定分支,   //这一步才是提交文件

    在提交过程中可能遇到从他人git库中下载文件,但是需要提交到自己的git库,这里可以执行   git remote set-url origin  http://(我的地址)     来实现更改提交地址.

  • 相关阅读:
    LeetCode 260
    LeetCode 258
    LeetCode 237
    LeetCode 226
    LeetCode 203
    LeetCode 202
    codeforces 7D
    codefroces 7C
    codeforces 7B
    codeforces 6E (非原创)
  • 原文地址:https://www.cnblogs.com/zhangxin4477/p/7928759.html
Copyright © 2011-2022 走看看