zoukankan      html  css  js  c++  java
  • 上传文件到github

    手把手教你如何使用 Git
        # 初始化一个新的Git仓库
        
        1.方式一: mkdir(make directory) test或者直接进入文件夹中再打开git  方式二:cd /文件夹 cd(change directory) c:/文件夹
        2.cd test(目录)
        # pwd 查看操作的目录
        # ls 查看当前的所有文件
        
        git init 进入 首次上传需要生成秘钥 代码在最后面
         
        $ git init
         
        C:/Users/10243/Desktop/mydate/.git/
          
         # 初始化后会产生一个.git 提供项目依赖配置文件
         
        $ ls -a 列出下面所有文件 包括隐藏文件
        ./  ../  .git/ 
    
        补充:$ ll
        total 7
        -rw-r--r-- 1 1847 197121 130  9月 13 17:33 config
        -rw-r--r-- 1 1847 197121  73  9月 13 17:33 description
        -rw-r--r-- 1 1847 197121  23  9月 13 17:33 HEAD
        drwxr-xr-x 1 1847 197121   0  9月 13 17:33 hooks/
        drwxr-xr-x 1 1847 197121   0  9月 13 17:33 info/
        drwxr-xr-x 1 1847 197121   0  9月 13 17:33 objects/
        drwxr-xr-x 1 1847 197121   0  9月 13 17:33 refs/
    
        
      
        
        3.git config --global user.name'AliceMye' 
          git config --global user.email'1024359512@qq.com' 
        
        4.git status 查看git 服务状态
         # 补充 cd .. 表示从git内 回到 最外层
        
        5.把项目拖到仓库根目录优酷server4 或者 自己创建
        
        6.git add server4 这个文件 添加到git
        
       
        
        7.git commit -m'你想要的文件传到github 上的文件描述'
        
        
         # 将文件从暂存区 提交到 git 仓库 git 在本地 githua在线上
         # $ git status
            On branch master
            nothing to commit, working tree clean
         # 说明已经无可上传文件clean
         
          
        8.git remote add origin https://github.com/AliceMye/ttt.git
        # remote 将文件代码添加到远程的文件路径中(github远程文件)
        
        
        9.git push -u origin master
        
        # push 到远程github 仓库中 origin(起源)
        # $ git push -u origin master
        Enumerating objects: 47, done.
        Counting objects: 100% (47/47), done.
        Delta compression using up to 4 threads
        Compressing objects: 100% (44/44), done.
        Writing objects: 100% (47/47), 17.10 MiB | 1.16 MiB/s, done.
        Total 47 (delta 0), reused 0 (delta 0)
        remote: warning: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
        remote: warning: See http://git.io/iEPt8g for more information.
        remote: warning: File youku_server4/upload_movie/3a0492cf5b522850b9957ea96305bd307a6018dda151bbdcf94d0cff11a07e6b1.今日内容.mp4 is 75.65 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
        To https://github.com/AliceMye/yyy.git
         * [new branch]      master -> master
        Branch 'master' set up to track remote branch 'master' from 'origin'.
        
        
        # 上传结束 提示:若要重新生成秘钥的话在git init 后去生成秘钥
        10.ssh-keygen -t rsa -C "https://github.com/AliceMye/yyy.git"
        # enter 直接过 生成秘钥
            1. /c/Users/10243/.ssh/id_rsa 找到这个文件用打开 copy 到githua ssh 秘钥中
            # $ ssh-keygen -t rsa -C "https://github.com/AliceMye/yyy.git"
            # Generating public/private rsa key pair.
            # Enter file in which to save the key (/c/Users/10243/.ssh/id_rsa):
    
            2.检验是否成功
                
            # 验证是否成功,在git bash里输入下面的命令
            ssh -T git@github.com  # github  # githua 命令
            ssh -T gitee@gitee.com  # gitee  # 码云的检验命令
       
        
  • 相关阅读:
    文本溢出显示省略号
    css3 计算属性 calc()
    让一个图片在div中居中(4种方法)
    css3 圆形、圆环、半圆、四分之一圆、扇形
    媒体查询
    base.css默认公共样式
    CSS 清除默认样式
    CSS篇之4---样式的层级关系,选择器优先级,样式冲突,以及抽离样式模块怎么写,说出思路,有无实践经验
    CSS篇之3---position 和 display 的取值和各自的意思和用法
    Selenium+Java+Jenkins+TestNg
  • 原文地址:https://www.cnblogs.com/mofujin/p/11519335.html
Copyright © 2011-2022 走看看