美文网首页
Git终端常用操作

Git终端常用操作

作者: 旷世流年 | 来源:发表于2022-01-10 18:12 被阅读0次

    1.将项目从服务器拉到本地

    例子

    bogon:~ apple$ cd         (打开文件)
    bogon:~ apple$ cd Desktop/LBGitProject/     (打开需要存储的文件夹)
    bogon:LBGitProject apple$ git clone https://libo@39.101.219.65:8443/r/ios/hspay.git 
    (拉取项目  项目链接,后续为获取过程) 
    Cloning into 'hspay'...
    Password for 'https://libo@39.101.219.65:8443': 
    remote: Counting objects: 4570, done
    remote: Finding sources: 100% (4570/4570)
    remote: Getting sizes: 100% (3361/3361)
    remote: Compressing objects:  10% (54/508)
    remote: Total 4570 (delta 1205), reused 4567 (delta 1205)
    Receiving objects: 100% (4570/4570), 133.89 MiB | 269.00 KiB/s, done.
    Resolving deltas: 100% (1206/1206), done.
    Checking out files: 100% (3682/3682), done.
    

    2.将整个项目传到服务器

    例子

    bogon:LBGitProject apple$ cd       (打开文件)
    bogon:~ apple$ cd Desktop/LBGitProject/hspay/    (打开项目文件地址)
    bogon:hspay apple$ git add .      (git 提交)
    bogon:hspay apple$ git commit -m"3.8.8"       (提交信息 后续为提交中)
    [master f5a9e2d] 3.8.8
     34 files changed, 1146 insertions(+)
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/Contents.json
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBActivityNo.imageset/Contents.json
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBActivityNo.imageset/矩形 21 拷贝.png
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBActivityNo.imageset/矩形 21 拷贝@2x.png
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBActivityNo.imageset/矩形 21 拷贝@3x.png
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBActivityPromotion.imageset/Contents.json
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBActivityPromotion.imageset/组 7 拷贝.png
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBActivityPromotion.imageset/组 7 拷贝@2x.png
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBActivityPromotion.imageset/组 7 拷贝@3x.png
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBPOS.imageset/Contents.json
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBPOS.imageset/POS机.png
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBPOS.imageset/POS机@2x.png
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBPOS.imageset/POS机@3x.png
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBactivitySure.imageset/Contents.json
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBactivitySure.imageset/矩形 15.png
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBactivitySure.imageset/矩形 15@2x.png
     create mode 100644 SHPAY/Assets.xcassets/LBAddView/LBactivitySure.imageset/矩形 15@3x.png
     create mode 100644 SHPAY/Assets.xcassets/NewClass/活动中心/hdAlertBack.imageset/图层 1.png
     create mode 100644 SHPAY/Assets.xcassets/NewClass/活动中心/hdAlertBack.imageset/图层 1@2x.png
     create mode 100644 SHPAY/Assets.xcassets/NewClass/活动中心/hdAlertBack.imageset/图层 1@3x.png
     delete mode 100644 SHPAY/Assets.xcassets/NewClass/活动中心/hdAlertBack.imageset/底部.png
     delete mode 100644 SHPAY/Assets.xcassets/NewClass/活动中心/hdAlertBack.imageset/底部@2x.png
     delete mode 100644 SHPAY/Assets.xcassets/NewClass/活动中心/hdAlertBack.imageset/底部@3x.png
     create mode 100644 SHPAY/LBNewAddView/View/LBActivityPromotionView.h
     create mode 100644 SHPAY/LBNewAddView/View/LBActivityPromotionView.m
     create mode 100644 SHPAY/LBNewAddView/View/LBCorrectTableViewCell.h
     create mode 100644 SHPAY/LBNewAddView/View/LBCorrectTableViewCell.m
     create mode 100644 SHPAY/LBNewAddView/ViewController/LBCorrectReceiveViewController.h
     create mode 100644 SHPAY/LBNewAddView/ViewController/LBCorrectReceiveViewController.m
     create mode 100644 SHPAY/LBNewAddView/ViewController/LBCorrectReceiveViewController.xib
     create mode 100644 SHPAY/LBNewAddView/ViewController/LBReceiveViewController.h
     create mode 100644 SHPAY/LBNewAddView/ViewController/LBReceiveViewController.m
     create mode 100644 SHPAY/LBNewAddView/ViewController/LBReceiveViewController.xib
    bogon:hspay apple$ git push origin master  (push进分支,后续push过程)
    Counting objects: 104, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (103/103), done.
    Writing objects: 100% (104/104), 2.79 MiB | 2.83 MiB/s, done.
    Total 104 (delta 54), reused 0 (delta 0)
    remote: Resolving deltas: 100% (54/54)
    remote: Updating references: 100% (1/1)
    To https://39.101.219.65:8443/r/ios/hspay.git
       ac7d579..f5a9e2d  master -> master
    

    相关文章

      网友评论

          本文标题:Git终端常用操作

          本文链接:https://www.haomeiwen.com/subject/rktvcrtx.html