2013年3月13日 星期三

git基本流程筆記

首先先在自己的github新增一個Repository

開git bash:
簡單說明整個流程就是,從github下載一個repo到自己的本機,然後新增幾個檔案,然後commit,在push上去。


user@USER-PC /d
$ git clone https://github.com/winwu/fitness_80_practice.git
把剛剛新建立的repo 克隆下來

Cloning into 'fitness_80_practice'...
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
Unpacking objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)


(=====手動複製要加入的檔案到/d/fitness_80_practice/=======)

user@USER-PC /d
$ cd fitness_80_practice/

user@USER-PC /d/fitness_80_practice (master)
$ git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       SOURCE/
#       index.html
nothing added to commit but untracked files present (use "git add" to track)

user@USER-PC /d/fitness_80_practice (master)
$ git add .
warning: LF will be replaced by CRLF in SOURCE/jquery.min.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in SOURCE/jquery.scrollorama.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in index.html.
The file will have its original line endings in your working directory.

user@USER-PC /d/fitness_80_practice (master)
$ git add .

user@USER-PC /d/fitness_80_practice (master)
$ git commit -m "add new file"
[master 9bc5274] add new file
warning: LF will be replaced by CRLF in SOURCE/jquery.min.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in SOURCE/jquery.scrollorama.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in index.html.
The file will have its original line endings in your working directory.
 15 files changed, 994 insertions(+)

 create mode 100644 SOURCE/sweet80.png
 create mode 100644 index.html

user@USER-PC /d/fitness_80_practice (master)
$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'upstream'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default upstream

See 'git help config' and search for 'push.default' for further information.

Username for 'https://github.com':
Password for 'https://winwu@github.com':
To https://github.com/winwu/fitness_80_practice.git
   ac2b662..9bc5274  master -> master

沒有留言:

張貼留言

若你看的文章,時間太久遠的問題就別問了,因為我應該也忘了... XD

Vue multiselect set autofocus and tinymce set autofocus

要在畫面一進來 focus multiselect 的方式: 參考: https://jsfiddle.net/shentao/mnphdt2g/ 主要就是在 multiselect 的 tag 加上 ref (例如: my_multiselect), 另外在 mounted...