git把本地文件上传到github上的步骤

简介: git把本地文件上传到github上的步骤

1.清除clean


2.返回上一级cd ..


3.克隆仓库地址git clone+地址


4.添加忽悠文件vim .gitignore


5查看cat .gitignore


6.进入到test,并且添加所有的文件:cd test    git add.


7.查看状态,绿色git status


8.提交git commit  -am "wangtingwx"


9.查看状态


10.放到github:   ----------git  push origin master


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/weixin


$ clean


bash: clean: command not found


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/weixin


$ clear


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/weixin


$ cd ..


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects


$ git clone https://github.com/wangxiaoting666/test.git


Cloning into 'test'...


warning: You appear to have cloned an empty repository.


Checking connectivity... done.


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects


$ vim .gitignore


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects


$ cat .gitignore


node_modules


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects


$ cd test


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/test(master)


$ git add .


warning: LF will be replaced by CRLF in node_modules/.bin/mime.


The file will have its original line endings in your working directory.


warning: LF will be replaced by CRLF in node_modules/accepts/HISTORY.md.


The file will have its original line endings in your working directory.


warning: LF will be replaced by CRLF in node_modules/accepts/LICENSE.


The file will have its original line endings in your working directory.


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/test(master)


$ git status


On branch master


Initial commit


Changes to be committed:


(use "git rm --cached ..." to unstage)


new file:   .project


new file:   node_modules/.bin/mime


new file:   node_modules/.bin/mime.cmd


new file:   node_modules/accepts/HISTORY.md


new file:   node_modules/accepts/LICENSE


new file:   node_modules/accepts/README.md


new file:   node_modules/accepts/index.js


new file:   node_modules/accepts/package.json


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/test(master)


$ git commit -am "wangtingwx"


[master (root-commit) 93dfc21] wangtingwx


warning: LF will be replaced by CRLF in node_modules/.bin/mime.


The file will have its original line endings in your working directory.


warning: LF will be replaced by CRLF in node_modules/accepts/HISTORY.md.


The file will have its original line endings in your working directory.


warning: LF will be replaced by CRLF in node_modules/accepts/LICENSE.


The file will have its original line endings in your working directory.


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/test(master)


$ git status


On branch master


Your branch is based on 'origin/master', but the upstream is gone.


(use "git branch --unset-upstream" to fixup)


nothing to commit, working directory clean


Administrator@PC-20160607HTQZMINGW64/d/Documents/HBuilderProjects/test(master)


$ git push origin master


Username for 'https://github.com': wangxiaoting666


Counting objects: 314, done.


Delta compression using up to 2 threads.


Compressing objects: 100% (302/302), done.


Writing objects: 100% (314/314), 284.07 KiB | 0 bytes/s, done.


Total 314 (delta 65), reused 0 (delta 0)


remote: Resolving deltas: 100% (65/65), done.


To https://github.com/wangxiaoting666/test.git


* [new branch]      master -> master

相关文章
|
1月前
|
开发工具 git
如何操作github,gitee,gitcode三个git平台建立镜像仓库机制,这样便于维护项目只需要维护一个平台仓库地址的即可-优雅草央千澈
如何操作github,gitee,gitcode三个git平台建立镜像仓库机制,这样便于维护项目只需要维护一个平台仓库地址的即可-优雅草央千澈
186 69
如何操作github,gitee,gitcode三个git平台建立镜像仓库机制,这样便于维护项目只需要维护一个平台仓库地址的即可-优雅草央千澈
|
9天前
|
人工智能 IDE 编译器
idea如何使用AI编程提升效率-在IntelliJ IDEA 中安装 GitHub Copilot 插件的步骤-卓伊凡
idea如何使用AI编程提升效率-在IntelliJ IDEA 中安装 GitHub Copilot 插件的步骤-卓伊凡
71 15
idea如何使用AI编程提升效率-在IntelliJ IDEA 中安装 GitHub Copilot 插件的步骤-卓伊凡
|
4天前
|
网络安全 开发工具 git
解决 Git 访问 GitHub 时的 SSL 错误
通过上述步骤,可以有效解决 Git 访问 GitHub 时的 SSL 错误。推荐优先更新 CA 证书和正确配置 Git 使用 CA 证书,避免禁用 SSL 验证。如果问题持续,可以切换到 SSH 方式访问 GitHub,确保连接的安全性和稳定性。希望这些内容对您的学习和工作有所帮助。
49 3
|
1月前
|
Devops Shell 网络安全
git使用之如何将一套代码同时推送至github|gitee|gitcode|gitlab等多个仓库-含添加ssh-优雅草央千澈完美解决-提供整体提交代码
git使用之如何将一套代码同时推送至github|gitee|gitcode|gitlab等多个仓库-含添加ssh-优雅草央千澈完美解决-提供整体提交代码
85 16
git使用之如何将一套代码同时推送至github|gitee|gitcode|gitlab等多个仓库-含添加ssh-优雅草央千澈完美解决-提供整体提交代码
|
3月前
|
网络安全 开发工具 git
解决fatal:remote error:You can’t push to git://github.com/username/*.g
通过上述诊断与修复步骤,绝大多数的推送错误都能得到有效解决,确保您的Git工作流顺畅无阻。
299 1
|
3月前
|
Linux 网络安全 开发工具
IDEA如何配置git和github
【11月更文挑战第14天】本指南详细介绍了如何在 IntelliJ IDEA 中配置 Git 和 GitHub,包括检查和设置 Git 路径、测试配置,以及通过 SSH 或 HTTPS 方式配置 GitHub 仓库的具体步骤。完成配置后,用户可在 IDEA 中轻松进行版本控制操作。
473 0
|
4月前
|
Unix Shell 网络安全
git学习六:(bug总结)git@github.com: Permission denied (publickey).等
本文是关于解决在使用Git和GitHub时遇到的“git@github.com: Permission denied (publickey)”错误的指南。文章提供了详细的步骤,包括确认SSH Agent运行状态、检查密钥配置、确保密钥匹配、验证仓库URL、检查权限和代理设置,以及配置SSH文件。这些步骤帮助用户诊断并解决SSH认证问题。
509 0
|
5月前
|
开发工具 git 开发者
掌握版本控制的艺术:Git 与 GitHub 的高效使用指南
在软件开发中,版本控制对于代码管理和团队协作至关重要。本文详细介绍了 Git 的核心概念与命令,包括初始化、创建仓库、文件跟踪、分支管理和远程仓库操作。同时,探讨了如何利用 GitHub 进行项目组织、代码审查及自动化工作流。通过遵循最佳实践,如频繁提交、清晰的信息记录和合理使用分支,开发者可以提升工作效率和团队协作能力,确保项目的持续成功。
|
5月前
|
Shell 网络安全 开发工具
Git,GitHub,Gitee&IDEA集成Git
Git提交项目到GitHub简洁版、版本控制、安装、常用命令、分支、团队协作机制、Github、Gitee远程仓库、IDEA集成Git、IDEA集成Github、IDEA集成Gitee
|
5月前
|
Shell 网络安全 开发工具
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file

热门文章

最新文章