Giter Club home page Giter Club logo

text's Introduction

text

我的项目哈(学习github专用) 一、 打开命令行终端,进入项目所在的本地目录,将目录初始化为一个 Git 项目

$ git init

此时会在目录中创建一个 .git 隐藏文件夹

二、 将所有文件放进新的本地 git 仓库

$ git add .

如果你本地已经有 .gitignore 文件,会按照已有规则过滤不需要添加的文件。如果不想要添加所有文件,可以把 . 符号换成具体的文件名

三、 将添加的文件提交到仓库

$ git commit -m "Initial commit"

四、 访问 GitHub

有些时候可能要翻墙

五、 创建一个新仓库

为了避免冲突,先不要勾选 README 和 LICENSE 选项

六、 在生成的项目主页上,复制仓库地址

类似于 https://github.com/XXX.git

七、 回到命令行终端界面,将本地仓库关联到远程仓库

$ git remote add origin https://github.com/XXX.git

可运行以下命令查看结果:

$ git remote -v

八、 提交代码到 GitHub 仓库

$ git push -f origin master

强制推送 git push -f origin master

text's People

Contributors

huangcongqing avatar

Watchers

James Cloos avatar  avatar

Forkers

xiangchen982

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.