git------為分支添加注釋

在git開發(fā)中鞋屈,難免會因為分支過多難以管理昭抒。所以注釋是有必要的;

在安裝之前先要安裝npm;

sudo apt install npm

可能會遇到問題:

Readingpackagelists... Done

Building dependency tree

Reading state information... Done

Somepackages couldnotbe installed. This may mean that you have

requested an impossible situationorifyouareusingthe unstable

distribution thatsomerequiredpackages havenotyet been created

orbeen movedoutofIncoming.

Thefollowinginformation mayhelptoresolve the situation:

Thefollowingpackages have unmet dependencies:

npm : Depends: nodejs but itisnotgoingtobe installed

Depends: node-abbrev (>=1.0.4) but itisnotgoingtobe installed

Depends: node-ansi (>=0.3.0-2) but itisnotgoingtobe installed

Depends: node-ansi-color-tablebut itisnotgoingtobe installed

Depends: node-archy but itisnotgoingtobe installed

Depends: node-block-stream but itisnotgoingtobe installed

Depends: node-fstream (>=0.1.22) but itisnotgoingtobe installed

Depends: node-fstream-ignorebut itisnotgoingtobe installed

Depends: node-github-url-from-git but itisnotgoingtobe installed

Depends: node-glob (>=3.1.21) but itisnotgoingtobe installed

Depends: node-graceful-fs (>=2.0.0) but itisnotgoingtobe installed

Depends: node-inherits but itisnotgoingtobe installed

Depends: node-ini (>=1.1.0) but itisnotgoingtobe installed

Depends: node-lockfile but itisnotgoingtobe installed

Depends: node-lru-cache(>=2.3.0) but itisnotgoingtobe installed

Depends: node-minimatch (>=0.2.11) but itisnotgoingtobe installed

Depends: node-mkdirp (>=0.3.3) but itisnotgoingtobe installed

Depends: node-gyp (>=0.10.9) but itisnotgoingtobe installed

Depends: node-nopt (>=3.0.1) but itisnotgoingtobe installed

Depends: node-npmlog but itisnotgoingtobe installed

Depends: node-once but itisnotgoingtobe installed

Depends: node-osenv but itisnotgoingtobe installed

Depends: node-readbut itisnotgoingtobe installed

Depends: node-read-package-json(>=1.1.0) but itisnotgoingtobe installed

Depends: node-request (>=2.25.0) but itisnotgoingtobe installed

Depends: node-retry but itisnotgoingtobe installed

Depends: node-rimraf (>=2.2.2) but itisnotgoingtobe installed

Depends: node-semver (>=2.1.0) but itisnotgoingtobe installed

Depends: node-shabut itisnotgoingtobe installed

Depends: node-slide but itisnotgoingtobe installed

Depends: node-tar (>=0.1.18) but itisnotgoingtobe installed

Depends: node-underscore but itisnotgoingtobe installed

Depends: node-which but itisnotgoingtobe installed

解決:

sudo apt-get install aptitude

sudo aptitude install npm

出現:Accept this solution? [Y/n/q/?]? ?請選擇Y

The following NEW packages will be installed:

gyp{a}javascript-common{a}libjs-async{a}libjs-inherits{a}libjs-jquery{a}libjs-node-uuid{a}

libjs-underscore{a}node-abbrev{a}node-ansi{a}node-ansi-color-table{a}node-archy{a}node-async{a}

node-balanced-match{a}node-block-stream{a}node-brace-expansion{a}node-builtin-modules{a}

node-combined-stream{a}node-concat-map{a}node-cookie-jar{a}node-delayed-stream{a}node-forever-agent{a}

node-form-data{a}node-fs.realpath{a}node-fstream{a}node-fstream-ignore{a}node-github-url-from-git{a}

node-glob{a}node-graceful-fs{a}node-gyp{a}node-hosted-git-info{a}node-inflight{a}node-inherits{a}

node-ini{a}node-is-builtin-module{a}node-isexe{a}node-json-stringify-safe{a}node-lockfile{a}

node-lru-cache{a}node-mime{a}node-minimatch{a}node-mkdirp{a}node-mute-stream{a}node-node-uuid{a}

node-nopt{a}node-normalize-package-data{a}node-npmlog{a}node-once{a}node-osenv{a}node-path-is-absolute{a}

node-pseudomap{a}node-qs{a}node-read{a}node-read-package-json{a}node-request{a}node-retry{a}node-rimraf{a}

node-semver{a}node-sha{a}node-slide{a}node-spdx-correct{a}node-spdx-expression-parse{a}

node-spdx-license-ids{a}node-tar{a}node-tunnel-agent{a}node-underscore{a}node-validate-npm-package-license{a}

node-which{a}node-wrappy{a}node-yallist{a}npm

0packages upgraded,70newly installed,0toremoveand335notupgraded.

Needtoget2536kBofarchives. After unpacking15.2MB will be used.

The following packages have unmet dependencies:

nodejs : Conflicts: npm but3.5.2-0ubuntu4istobe installed

The following actions will resolve these dependencies:

? ? Keep the following packages at their current version:

1)? ? npm [NotInstalled]

Accept this solution? [Y/n/q/?] Y

No packages will be installed, upgraded,orremoved.

0packages upgraded,0newly installed,0toremoveand335notupgraded.

Needtoget0Bofarchives. After unpacking0B will be used.

npm -v? 查看版本徙瓶,可以看到npm已經安裝完畢;

注意!O劭谩B冈獭:如果出現:說明你沒有切換到root用戶權限应闯;



最后執(zhí)行npm i -g git-br

安裝git分支注釋成功态贤;

正巢绺撸可以這樣添加注釋:

git config branch.分支名.description '這里添加注釋'

然后獲取分支注釋谬以;

git config branch.分支名.description

現在添加注釋不變邑雅,但是可以? git br 命令獲取分支和注釋;

友情提示:

在安裝之后可能會出現沒有tab自動補全了洞难,這個問題沒有細去研究揭朝,過一會自動好了编丘;

不過可以這么做:

1.下載配置文件?git clone git://git.kernel.org/pub/scm/git/git.git

2.cp? git/contrib/completion/git-completion.bash? ~/.git-completion.bash

3.在.bashrc中添加??source ~/.git-completion.bash

4.source?~/.bashrc

這樣可以解決沒有自動補全的問題;

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
  • 序言:七十年代末幕屹,一起剝皮案震驚了整個濱河市说敏,隨后出現的幾起案子,更是在濱河造成了極大的恐慌角虫,老刑警劉巖伟骨,帶你破解...
    沈念sama閱讀 218,036評論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件继蜡,死亡現場離奇詭異,居然都是意外死亡逛腿,警方通過查閱死者的電腦和手機稀并,發(fā)現死者居然都...
    沈念sama閱讀 93,046評論 3 395
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來单默,“玉大人碘举,你說我怎么就攤上這事「槔” “怎么了引颈?”我有些...
    開封第一講書人閱讀 164,411評論 0 354
  • 文/不壞的土叔 我叫張陵,是天一觀的道長境蜕。 經常有香客問我蝙场,道長,這世上最難降的妖魔是什么粱年? 我笑而不...
    開封第一講書人閱讀 58,622評論 1 293
  • 正文 為了忘掉前任售滤,我火速辦了婚禮,結果婚禮上,老公的妹妹穿的比我還像新娘完箩。我一直安慰自己赐俗,他們只是感情好,可當我...
    茶點故事閱讀 67,661評論 6 392
  • 文/花漫 我一把揭開白布弊知。 她就那樣靜靜地躺著秃励,像睡著了一般。 火紅的嫁衣襯著肌膚如雪吉捶。 梳的紋絲不亂的頭發(fā)上夺鲜,一...
    開封第一講書人閱讀 51,521評論 1 304
  • 那天,我揣著相機與錄音呐舔,去河邊找鬼币励。 笑死,一個胖子當著我的面吹牛珊拼,可吹牛的內容都是我干的食呻。 我是一名探鬼主播,決...
    沈念sama閱讀 40,288評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼澎现,長吁一口氣:“原來是場噩夢啊……” “哼仅胞!你這毒婦竟也來了?” 一聲冷哼從身側響起剑辫,我...
    開封第一講書人閱讀 39,200評論 0 276
  • 序言:老撾萬榮一對情侶失蹤干旧,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后妹蔽,有當地人在樹林里發(fā)現了一具尸體椎眯,經...
    沈念sama閱讀 45,644評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 37,837評論 3 336
  • 正文 我和宋清朗相戀三年胳岂,在試婚紗的時候發(fā)現自己被綠了编整。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 39,953評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡乳丰,死狀恐怖掌测,靈堂內的尸體忽然破棺而出,到底是詐尸還是另有隱情产园,我是刑警寧澤汞斧,帶...
    沈念sama閱讀 35,673評論 5 346
  • 正文 年R本政府宣布,位于F島的核電站淆两,受9級特大地震影響断箫,放射性物質發(fā)生泄漏。R本人自食惡果不足惜秋冰,卻給世界環(huán)境...
    茶點故事閱讀 41,281評論 3 329
  • 文/蒙蒙 一仲义、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦埃撵、人聲如沸赵颅。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,889評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽饺谬。三九已至,卻和暖如春谣拣,著一層夾襖步出監(jiān)牢的瞬間募寨,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,011評論 1 269
  • 我被黑心中介騙來泰國打工森缠, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留拔鹰,地道東北人。 一個月前我還...
    沈念sama閱讀 48,119評論 3 370
  • 正文 我出身青樓贵涵,卻偏偏與公主長得像列肢,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子宾茂,可洞房花燭夜當晚...
    茶點故事閱讀 44,901評論 2 355

推薦閱讀更多精彩內容

  • 1瓷马、瀏覽器區(qū)塊鏈Demo 區(qū)塊鏈的概念起源于比特幣,其本質上是一個去中心化的數據庫跨晴,是分布式數據存儲欧聘、點對點傳輸(...
    良__閱讀 1,524評論 0 2
  • 1、npm安裝 (sudo apt-get install npm)坟奥,可能需要先軟件更新(sudo apt-get...
    leo1091閱讀 8,303評論 0 2
  • 摘要 安裝fis3首先要安裝 node 和 npm ; 如果不知道自己是否已經安裝 node 和 npm ; 那就...
    SimonLike閱讀 2,867評論 0 0
  • 轉戰(zhàn)vscode 20170829 Sublime Text 插件介紹合集 1 Emmet 功能:編碼快捷鍵树瞭,前端...
    小小游輪閱讀 2,722評論 0 9
  • 推薦指數: 6.0 書籍主旨關鍵詞:特權、焦點爱谁、注意力、語言聯想孝偎、情景聯想 觀點: 1.統計學現在叫數據分析访敌,社會...
    Jenaral閱讀 5,721評論 0 5