avatar
fireworks99
keep hungry keep foolish

My way to upload my project to github

Description

Upload my project to github

  1. 在github上new一个仓库
  2. 在本地想上传的项目目录下执行git init
sj@fireworks99 MINGW64 /e/FrontEnd/chrome_extensions (master)
$ git fetch github main
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
From github.com:fireworks99/RGB_Hexa
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> github/main

sj@fireworks99 MINGW64 /e/FrontEnd/chrome_extensions (master)
$ git merge github/main

sj@fireworks99 MINGW64 /e/FrontEnd/chrome_extensions (master)
$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        RGB_Hexa/

nothing added to commit but untracked files present (use "git add" to track)

sj@fireworks99 MINGW64 /e/FrontEnd/chrome_extensions (master)
$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   README.md

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        RGB_Hexa/
        demo/

no changes added to commit (use "git add" and/or "git commit -a")

sj@fireworks99 MINGW64 /e/FrontEnd/chrome_extensions (master)
$ git add .

sj@fireworks99 MINGW64 /e/FrontEnd/chrome_extensions (master)
$ git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   README.md
        new file:   RGB_Hexa/background.js
        new file:   RGB_Hexa/images/icon128.png
        new file:   RGB_Hexa/images/icon16.png
        new file:   RGB_Hexa/images/icon32.png
        new file:   RGB_Hexa/images/icon48.png
        new file:   RGB_Hexa/manifest.json
        new file:   RGB_Hexa/popup.html
        new file:   RGB_Hexa/popup.js
        new file:   demo/initial.png
        new file:   demo/load_extension.png
        new file:   demo/test1.png
        new file:   demo/test2.png


sj@fireworks99 MINGW64 /e/FrontEnd/chrome_extensions (master)
$ git commit -m'First upload'
[master a4a81ef] First upload
 13 files changed, 152 insertions(+)
 create mode 100644 RGB_Hexa/background.js
 create mode 100644 RGB_Hexa/images/icon128.png
 create mode 100644 RGB_Hexa/images/icon16.png
 create mode 100644 RGB_Hexa/images/icon32.png
 create mode 100644 RGB_Hexa/images/icon48.png
 create mode 100644 RGB_Hexa/manifest.json
 create mode 100644 RGB_Hexa/popup.html
 create mode 100644 RGB_Hexa/popup.js
 create mode 100644 demo/initial.png
 create mode 100644 demo/load_extension.png
 create mode 100644 demo/test1.png
 create mode 100644 demo/test2.png
  1. github上新建分支master,设为主分支
sj@fireworks99 MINGW64 /e/FrontEnd/chrome_extensions (master)
$ git push
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using

    git remote add <name> <url>

and then push using the remote name

    git push <name>


sj@fireworks99 MINGW64 /e/FrontEnd/chrome_extensions (master)
$ git push github master
Enumerating objects: 20, done.
Counting objects: 100% (20/20), done.
Delta compression using up to 4 threads
Compressing objects: 100% (18/18), done.
Writing objects: 100% (18/18), 95.40 KiB | 734.00 KiB/s, done.
Total 18 (delta 0), reused 0 (delta 0)
To github.com:fireworks99/RGB_Hexa.git
   812d257..a4a81ef  master -> master
Site by Baole Zhao | Powered by Hexo | theme PreciousJoy