Steps for Git to upload a local file to GitHub

Source: Internet
Author: User
Tags git clone

1. Clear Clean

2. Return to the previous level CD.

3. Clone Warehouse address git clone+ address

4. Add the flicker file vim. gitignore

5 View Cat. Gitignore

6. Go to test and add all the files: cd test git Add.

7. View status, green git status

8. Commit git Commit-am "wangtingwx"

9. View status

10. Put to GitHub:----------git push Origin master

[Email Protected]/d/documents/hbuilderprojects/weixin

$ clean

Bash:clean:command not found

[Email Protected]/d/documents/hbuilderprojects/weixin

$ clear

[Email Protected]/d/documents/hbuilderprojects/weixin

$ CD.

[Email protected]/d/documents/hbuilderprojects

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

Cloning into ' test ' ...

Warning:you appear to has cloned an empty repository.

Checking connectivity ... done.

[Email protected]/d/documents/hbuilderprojects

$ vim. Gitignore

[Email protected]/d/documents/hbuilderprojects

$ cat. Gitignore

Node_modules

[Email protected]/d/documents/hbuilderprojects

$ CD Test

[Email protected]/d/documents/hbuilderprojects/test (master)

$ git Add.

WARNING:LF is replaced by CRLF in Node_modules/.bin/mime.

The file would have their original line endings in your working directory.

WARNING:LF is replaced by CRLF in NODE_MODULES/ACCEPTS/HISTORY.MD.

The file would have their original line endings in your working directory.

WARNING:LF is replaced by CRLF in Node_modules/accepts/license.

The file would have their original line endings in your working directory.

[Email protected]/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

[Email protected]/d/documents/hbuilderprojects/test (master)

$ git commit-am "wangtingwx"

[Master (Root-commit) 93dfc21] Wangtingwx

WARNING:LF is replaced by CRLF in Node_modules/.bin/mime.

The file would have their original line endings in your working directory.

WARNING:LF is replaced by CRLF in NODE_MODULES/ACCEPTS/HISTORY.MD.

The file would have their original line endings in your working directory.

WARNING:LF is replaced by CRLF in Node_modules/accepts/license.

The file would have their original line endings in your working directory.

[Email protected]/d/documents/hbuilderprojects/test (master)

$ git status

On Branch Master

Your Branch is based on ' Origin/master ', and the upstream is gone.

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

Nothing-to-commit, working directory clean

[Email protected]/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), reused 0 (Delta 0)

Remote:resolving deltas:100% (65/65), done.

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

* [New branch] Master, master

Steps for Git to upload a local file to GitHub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.