新手使用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".这是一个不可删文件,因为暂存区和历史区还有一些其他的信息都在这里,删掉就不是一个完整的仓库了 ...
随机推荐
- Maven开发环境搭建
配置Maven流程: 1.下载Maven,官网:http://maven.apache.org/ 2.安装到本地: 1 ).解压apache-maven-x.x.x-bin.zip文件 2 ).配置M ...
- LVM逻辑卷的扩充
LVM 的全名是 Logical Volume Manager,中文可以翻译作逻辑滚动条管理员.之所以称为”滚动条”可能是因为可以将 filesystem 像滚动条一样伸长或缩短.LVM 的作法是将几 ...
- shell基础操作
一.字符串 字符串是shell编程中最常用的数据类型,字符串可以用单引号,也可以用双引号,也可以不用引号. 单引号 name='xiaoxi' 单引号的限制: 单引号里的任何字符都会原样输出,单引号中 ...
- springboot 配置访问本地图片
spring.mvc.static-path-pattern=/image/** spring.resources.static-locations=file:D://image/
- ubuntu 18.04更换源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak //备份 sudo vim /etc/apt/sources.list //修改 ##阿 ...
- 三、Appium-python-UI自动化之元素定位uiautomatorviewer
uiautomatorviewer是android-sdk自带的一个元素定位工具,非常简单好用,使用uiautomatorviewer,可以检查一个应用的UI来查看应用的布局和组件以及相关的属性. 一 ...
- leetcode 113 path Sum II 路径和
递归先序遍历+vector<int>容器记录路径 /** * Definition for a binary tree node. * struct TreeNode { * int va ...
- 用Vue来实现音乐播放器(三十八):歌词滚动列表的问题
1.频繁切换歌曲时,歌词会跳来跳去 原因: // 歌词跳跃是因为内部有一个currentLyric对像内部有一些功能来完成歌词的跳跃 //每个currentLyric能实现歌曲的播放跳到相应的位置 是 ...
- tomcat 404 The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
1.原因 tomcat没有找到项目,因为是用eclipse启动的,不是在tomcat的目录下启动,所以我们需要在eclipse下配置启动目录,好让tomcat找到项目. 2.解决 用本地安装的tomc ...
- Centos6.5安装配置svn服务器
一. yum安装svn服务器 yum -y install subversion 二. 检测安装结果 svnserve --version //显示安装结果,表示安装成功了 三. 创建代码仓库目录 m ...