新手使用GIT 上传文件到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 # 码云的检验命令
新手使用GIT 上传文件到github的更多相关文章
- git上传文件到github
一.git之上传代码到github. 安装git,这个就不说了,很多帖子都有详细说明. 二.新建仓库,GitHub上的,首先申请账号. 三.本地选择地方新建本地仓库. 建完本地仓库文件夹,在本地 ...
- git上传文件到github与gulp的简单使用
git有两种方式提交源代码到github 第一种方式通过地址提交下面介绍的是通过ssh方式上传 git使用ssh方式上传代码到githubgit首先要生成公钥和私钥 将公钥添加到github中将私钥保 ...
- 使用Git上传文件到github
第一次利用git连接github时往往都不会勾选Initialize this repository with a README,这样的的确确是简单了,但是如果我们需要勾选,勾选了之后应该怎么办呢?1 ...
- 利用git上传文件到github
git add 文件名称/. "."代表全部 git commit -m -a git push -u origin master 推送到远程仓库 ---------------- ...
- 使用Git上传文件至Github
记录一下怎么把文件上传到Github,因为之前都存在本地,没上传过Github,自己以后看起来也有个记忆.因为我自己已经安装好Git和注册好Github账号了,设置好了SSH key.这部分不懂的,就 ...
- Git在windows下上传文件至github流程
github是开发者分享的一个平台,这里不多说,想要上传文件至github需要有一个开发者账号,还需要在windows下安装好了git. 做好准备工作之后,接下来操作 一:登录github,创建项目 ...
- Git学习笔记——从一台电脑上传文件到Github上
目标:从一台电脑上传文件到Github上 前提: 1.这里假定已在Github上创建了仓库,建立了仓库 2.已在这台电脑上安装了Git客户端 实验环境: 1.Windows 10 64位,已安装了Gi ...
- 使用git上传项目到GitHub上
之前的博客有<使用git拉取GitHub上的项目>的文章,那么现在说一下,如何上传项目到GitHub上. 1. Git的.gitignore 文档配置 因为项目中可能有很多的图片还有nod ...
- 用git上传项目到GitHub或者码云全过程
用git上传项目到GitHub或者码云全过程 1. 会生成一个隐藏文件夹".git".这是一个不可删文件,因为暂存区和历史区还有一些其他的信息都在这里,删掉就不是一个完整的仓库了 ...
随机推荐
- free查看内存使用情况
查看当前内存使用情况 [xiaoxi@xiaoxitest data]$ free -m total used free shared buffers cached Mem: -/+ buffers/ ...
- Http请求详解(转)----请求+响应各字段详解
参考HTTP深入浅出http请求(转)-----http请求的过程和实现机制 1. HTTP请求格式 首先介绍HTTP协议:超文本传输协议(HTTP,HyperText Transfer Protoc ...
- 利用IKVM在C#中调Java程序(总结+案例)
IKVM.NET是一个针对Mono和微软.net框架的java实现,其设计目的是在.NET平台上运行java程序.本文将比较详细的介绍这个工具的原理.使用入门(如何java应用转换为.NET应用.), ...
- 《Effective Java》读书笔记 - 11.序列化
Chapter 11 Serialization Item 74: Implement Serializable judiciously 让一个类的实例可以被序列化不仅仅是在类的声明中加上" ...
- 2018-2019-2-20175225 实验三 《敏捷开发与XP实践》实验报告
一.实验内容与步骤 1.安装.使用alibaba插件规范代码 - 在IDEA的setting中找到plugins并搜索alibaba,点击install进行安装 - 重启IDEA后,在代码中右击点击编 ...
- centos下面配置key登录
centos下需要配置使用key登录,并且要禁止root登录 下面的操作都是用root来设置的 1.添加新用户 例如用户名leisiyuan useradd leisiyuan 2.设置密码 pass ...
- leetcode-easy-array-189 Rotate Array
mycode 75.59% class Solution(object): def rotate(self, nums, k): """ :type nums: Lis ...
- Oracle数据库用户的密码过期问题处理
SQL> select username, user_id, account_status,expiry_date, profile from dba_users where username ...
- EMQ插件通过HTTP连接认证服务器实现认证
需求 在EMQ中添加认证插件,将到来的MQTT连接的ClientID.UserName.Password通过HTTP协议发送到认证服务器,用返回的数据决定是否允许该连接: 在连接时和断开时向服务器发送 ...
- 【flask_sqlalchemy】模糊查询
flask_sqlalchemy的查询方法有filter()和filter_() 这2个方法的主要区别如下: 模块 语法 ><(大于和小于)查询 and_和or_查询 filter_by( ...