手把手教你如何使用 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 # 码云的检验命令

新手使用GIT 上传文件到github的更多相关文章

  1. git上传文件到github

     一.git之上传代码到github. 安装git,这个就不说了,很多帖子都有详细说明.  二.新建仓库,GitHub上的,首先申请账号.  三.本地选择地方新建本地仓库. 建完本地仓库文件夹,在本地 ...

  2. git上传文件到github与gulp的简单使用

    git有两种方式提交源代码到github 第一种方式通过地址提交下面介绍的是通过ssh方式上传 git使用ssh方式上传代码到githubgit首先要生成公钥和私钥 将公钥添加到github中将私钥保 ...

  3. 使用Git上传文件到github

    第一次利用git连接github时往往都不会勾选Initialize this repository with a README,这样的的确确是简单了,但是如果我们需要勾选,勾选了之后应该怎么办呢?1 ...

  4. 利用git上传文件到github

    git add 文件名称/. "."代表全部 git commit -m -a git push -u origin master 推送到远程仓库 ---------------- ...

  5. 使用Git上传文件至Github

    记录一下怎么把文件上传到Github,因为之前都存在本地,没上传过Github,自己以后看起来也有个记忆.因为我自己已经安装好Git和注册好Github账号了,设置好了SSH key.这部分不懂的,就 ...

  6. Git在windows下上传文件至github流程

    github是开发者分享的一个平台,这里不多说,想要上传文件至github需要有一个开发者账号,还需要在windows下安装好了git. 做好准备工作之后,接下来操作 一:登录github,创建项目 ...

  7. Git学习笔记——从一台电脑上传文件到Github上

    目标:从一台电脑上传文件到Github上 前提: 1.这里假定已在Github上创建了仓库,建立了仓库 2.已在这台电脑上安装了Git客户端 实验环境: 1.Windows 10 64位,已安装了Gi ...

  8. 使用git上传项目到GitHub上

    之前的博客有<使用git拉取GitHub上的项目>的文章,那么现在说一下,如何上传项目到GitHub上. 1. Git的.gitignore 文档配置 因为项目中可能有很多的图片还有nod ...

  9. 用git上传项目到GitHub或者码云全过程

    用git上传项目到GitHub或者码云全过程 1. 会生成一个隐藏文件夹".git".这是一个不可删文件,因为暂存区和历史区还有一些其他的信息都在这里,删掉就不是一个完整的仓库了 ...

随机推荐

  1. ZooKeeper设置开机启动

    1 在init.d目录下新建脚本文件 进入到/etc/rc.d/init.d目录下,命令是: cd    /etc/rc.d/init.d 新建一个名为zookeeper的文件,命令是: touch ...

  2. Tree and Permutation

    Tree and Permutation 给出一个1,2,3...N的排列,显然全部共有N!种排列,每种排列的数字代表树上的一个结点,设Pi是其中第i种排列的相邻数字表示的结点的距离之和,让我们求su ...

  3. JavaScript的事件队列(Event Queue)---宏任务和微任务

    前言 在写代码的时候经常思考一个问题,到底是那个函数先执行,本身JavaScript是一门单线程的语言,意思就是按照顺序执行.但是加入一些setTimeout和promise的函数来又实现了异步操作, ...

  4. 【每日一包0005】arr-flatten

    github地址:https://github.com/ABCDdouyae... arr-flatten 将多维数组展开成一维数组 文档地址:https://www.npmjs.com/packag ...

  5. Vue学习(一) :入门案例

    1. 开始前的准备 IDE:VSCode(推荐)或者Sublime Text 前导技术:JavaScript中级 2. 官方提供的product例程 product.html页面代码: <div ...

  6. a标签点击,页面自动刷新

    <a href="javascript:void(0)" id="reDiagnosis" class="checkBtn"oncli ...

  7. SpringBoot(十二):SpringBoot整合Kafka

    https://blog.csdn.net/saytime/article/details/79950635

  8. RCU原理分析

    简介 RCU(Read-Copy Update)是数据同步的一种方式,在当前的Linux内核中发挥着重要的作用.RCU主要针对的数据对象是链表,目的是提高遍历读取数据的效率,为了达到目的使用RCU机制 ...

  9. C#单元测试Nunit小结

    1. 下载和安装Nunit工具: NUnit是一款堪与JUnit齐名的开源的回归测试框架,供.net开发人员做单元测试之用,可以从www.nunit.org网站上免费获得,然后在系统中安装: 2. 在 ...

  10. 阶段3 1.Mybatis_11.Mybatis的缓存_5 缓存的概念

    2.Mybatis中的缓存     什么是缓存         存在于内存中的临时数据.     为什么使用缓存         减少和数据库的交互次数,提高执行效率.     什么样的数据能使用缓存 ...