Git 配置記錄

``
[johnson@localhost mmall]$ touch README.md
[johnson@localhost mmall]$ touch .gitignore
[johnson@localhost mmall]$ git init
Initialized empty Git repository in /home/johnson/IdeaProjects/mmall/.git/
[johnson@localhost mmall]$ git status
On branch master

Initial commit

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

    .gitignore
    README.md
    out/
    pom.xml
    src/
    web/

nothing added to commit but untracked files present (use "git add" to track)
[johnson@localhost mmall]$ git add.
git: 'add.' is not a git command. See 'git --help'.

Did you mean this?
add
[johnson@localhost mmall]$ git add .
[johnson@localhost mmall]$ git status
On branch master

Initial commit

Changes to be committed:
(use "git rm --cached <file>..." to unstage)

    new file:   .gitignore
    new file:   README.md
    new file:   out/artifacts/mmall_Web_exploded/META-INF/MANIFEST.MF
    new file:   out/artifacts/mmall_Web_exploded/WEB-INF/web.xml
    new file:   out/artifacts/mmall_Web_exploded/index.jsp
    new file:   pom.xml
    new file:   src/main/webapp/WEB-INF/web.xml
    new file:   src/main/webapp/index.jsp
    new file:   web/WEB-INF/web.xml
    new file:   web/index.jsp

[johnson@localhost mmall]$ git commit -am 'fisrt commit init '
[master (root-commit) f56ef87] fisrt commit init
Committer: johnson.ski johnson@localhost.localdomain
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

git config --global --edit

After doing this, you may fix the identity used for this commit with:

git commit --amend --reset-author

10 files changed, 107 insertions(+)
create mode 100644 .gitignore
create mode 100644 README.md
create mode 100644 out/artifacts/mmall_Web_exploded/META-INF/MANIFEST.MF
create mode 100644 out/artifacts/mmall_Web_exploded/WEB-INF/web.xml
create mode 100644 out/artifacts/mmall_Web_exploded/index.jsp
create mode 100644 pom.xml
create mode 100644 src/main/webapp/WEB-INF/web.xml
create mode 100644 src/main/webapp/index.jsp
create mode 100644 web/WEB-INF/web.xml
create mode 100644 web/index.jsp
[johnson@localhost mmall]$ git remote add origin git@github.com:jansony1/mmall.git
[johnson@localhost mmall]$ git branch

  • master
    [johnson@localhost mmall]$ git push -u origin master
    The authenticity of host 'github.com (192.30.255.113)' can't be established.
    RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'github.com,192.30.255.113' (RSA) to the list of known hosts.
    To github.com:jansony1/mmall.git
    ! [rejected] master -> master (fetch first)
    error: failed to push some refs to 'git@github.com:jansony1/mmall.git'
    hint: Updates were rejected because the remote contains work that you do
    hint: not have locally. This is usually caused by another repository pushing
    hint: to the same ref. You may want to first integrate the remote changes
    hint: (e.g., 'git pull ...') before pushing again.
    hint: See the 'Note about fast-forwards' in 'git push --help' for details.
    [johnson@localhost mmall]$ git pull
    Warning: Permanently added the RSA host key for IP address '192.30.255.112' to the list of known hosts.
    warning: no common commits
    remote: Counting objects: 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:jansony1/mmall

  • [new branch] master -> origin/master
    There is no tracking information for the current branch.
    Please specify which branch you want to merge with.
    See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=origin/<branch> master

[johnson@localhost mmall]$ git push -u origin master
To github.com:jansony1/mmall.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:jansony1/mmall.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
[johnson@localhost mmall]$ git push -u -f origin master
Counting objects: 20, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (20/20), 2.00 KiB | 0 bytes/s, done.
Total 20 (delta 0), reused 0 (delta 0)
To github.com:jansony1/mmall.git

  • 60fb02d...f56ef87 master -> master (forced update)
    Branch master set up to track remote branch master from origin.
    [johnson@localhost mmall]$ git branch
  • master
    [johnson@localhost mmall]$ git branch -r
    origin/master
    [johnson@localhost mmall]$ git checkout -b v1.0 origin/master
    Branch v1.0 set up to track remote branch master from origin.
    Switched to a new branch 'v1.0'
    [johnson@localhost mmall]$ git branch
    master
  • v1.0
    [johnson@localhost mmall]$ git push origin HEAD -u
    Total 0 (delta 0), reused 0 (delta 0)
    To github.com:jansony1/mmall.git
  • [new branch] HEAD -> v1.0
    Branch v1.0 set up to track remote branch v1.0 from origin.
    [johnson@localhost mmall]$
    ``
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末挺举,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子呼巴,更是在濱河造成了極大的恐慌陨簇,老刑警劉巖赁濒,帶你破解...
    沈念sama閱讀 219,039評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異,居然都是意外死亡蟋字,警方通過查閱死者的電腦和手機(jī)壹若,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,426評論 3 395
  • 文/潘曉璐 我一進(jìn)店門嗅钻,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人店展,你說我怎么就攤上這事养篓。” “怎么了赂蕴?”我有些...
    開封第一講書人閱讀 165,417評論 0 356
  • 文/不壞的土叔 我叫張陵柳弄,是天一觀的道長。 經(jīng)常有香客問我,道長碧注,這世上最難降的妖魔是什么嚣伐? 我笑而不...
    開封第一講書人閱讀 58,868評論 1 295
  • 正文 為了忘掉前任,我火速辦了婚禮萍丐,結(jié)果婚禮上轩端,老公的妹妹穿的比我還像新娘。我一直安慰自己逝变,他們只是感情好基茵,可當(dāng)我...
    茶點故事閱讀 67,892評論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著壳影,像睡著了一般拱层。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上宴咧,一...
    開封第一講書人閱讀 51,692評論 1 305
  • 那天舱呻,我揣著相機(jī)與錄音,去河邊找鬼悠汽。 笑死箱吕,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的柿冲。 我是一名探鬼主播茬高,決...
    沈念sama閱讀 40,416評論 3 419
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼假抄!你這毒婦竟也來了怎栽?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,326評論 0 276
  • 序言:老撾萬榮一對情侶失蹤宿饱,失蹤者是張志新(化名)和其女友劉穎熏瞄,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體谬以,經(jīng)...
    沈念sama閱讀 45,782評論 1 316
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡强饮,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,957評論 3 337
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了为黎。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片邮丰。...
    茶點故事閱讀 40,102評論 1 350
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖铭乾,靈堂內(nèi)的尸體忽然破棺而出剪廉,到底是詐尸還是另有隱情,我是刑警寧澤炕檩,帶...
    沈念sama閱讀 35,790評論 5 346
  • 正文 年R本政府宣布斗蒋,位于F島的核電站,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏泉沾。R本人自食惡果不足惜骤星,卻給世界環(huán)境...
    茶點故事閱讀 41,442評論 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望爆哑。 院中可真熱鬧,春花似錦舆吮、人聲如沸揭朝。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,996評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽潭袱。三九已至,卻和暖如春锋恬,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背与学。 一陣腳步聲響...
    開封第一講書人閱讀 33,113評論 1 272
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留索守,地道東北人。 一個月前我還...
    沈念sama閱讀 48,332評論 3 373
  • 正文 我出身青樓卵佛,卻偏偏與公主長得像杨赤,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子截汪,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,044評論 2 355

推薦閱讀更多精彩內(nèi)容