æ°ããä½æ¥ç°å¢ã§éçºãªãã¸ããªã®masterãªãã¸ããªãcloneãããã¨ã«ãã®ä»ã®ãã©ã³ããcheckout/pullããããã¨ããããã¨ããããããªãã¨ä½æ¥ã«ãªããªãã ããå¿ããã®ã§ã¡ã¢ã
æ°ããä½æ¥ç°å¢ã§éçºãªãã¸ããªã®masterãªãã¸ããªãcloneãããã¨ã«ãã®ä»ã®ãã©ã³ããcheckout/pullããããã¨ããããã¨ããããããªãã¨ä½æ¥ã«ãªããªãã ããå¿ããã®ã§ã¡ã¢ã
SourceTreeããä¹ãæãã¦ãçã®Gitã使ã£ã¦ããä¸ã§Hunkã®åãæ±ããããããªãã£ãã®ã§ã¡ã¢ã Hunkã®ã¹ãã¼ã¸(é¨åã³ããã)㯠git add -p åºæ¬ã¯ã-pããªãã·ã§ã³ãä»ããã°ãã¾ãããã ã¹ãã¼ã¸ã³ã°ã®å ´åã«ããã¦ã¯ã $ git add -p [file] ã¨ãããã¨ã§ã以ä¸ã®ããã«Hunkãã¨ã«åãè¾¼ããå¦ããèãã¦ããã $ git add -p dein_lazy.toml diff --git a/nvim/dein_lazy.toml b/nvim/dein_lazy.toml index 848ac2a..56daa89 100644 --- a/nvim/dein_lazy.toml +++ b/nvim/dein_lazy.toml @@ -57,4 +57,7 @@ on_i = 1 [[plugins]] #neomake repo = '
git add ããæã«ã-pããã¤ããã¨ããã®é¨å㯠add ãããã©ãã®é¨å㯠add ããªãã¨ãã£ãç´°ããæå®ãã§ãã¦ä¾¿å©ãªã®ã§ãããåããã¨ã reset ã¨ã checkout ã§ãã§ããã¨ããã®ãæè¿ç¥ãã¾ããã ä½æ¥ããã¦ããéä¸ã§ãå¤æ´ããç®æãå ã«æ»ãããæã¯ããããã¾ããããã¾ã add ãã¦ããªããã°ã % git checkout ãã¡ã¤ã«å ã§å¤æ´å 容ããªãã£ããã¨ã«ãã¦ãææ°ã®ã³ãããã®ç¶æ ã«æ»ããã¨ãã§ãã¾ãã ãã ä½æ¥å 容ã«ãã£ã¦ã¯ãå¤æ´ããç®æã®ä¸é¨ã ãæ®ãã¦å ã«æ»ãããã¨ãããã¨ããããã£ã¦ããã®æã«ãåæ§ã« -p ãªãã·ã§ã³ã使ããããã§ãã % git checkout -p diff --git a/chef-repo/nodes/192.168.33.50.json b/chef-repo/nodes/192.168.33.50.json ind
ç¹ã«ãããã¿ã¤ãçãªã³ã¼ããæ¸ãã¦ããæãå°æ¥çã«ã¯ãªãã·ã§ã³ãªã©ã§å¤æ´ã§ããããã«ããäºå®ã®ã¢ããã³ã¼ãã«ç´æ¸ãã§åãè¾¼ãã ããããããç°¡åãªãã®ã§ã¯1è¡ã ã£ãããè¤éãªãã®ã ã£ããã¢ãã¯ã®ã¯ã©ã¹ã ã£ããã ä»åã®ã¦ã¼ã¹ã±ã¼ã¹ã¯ããããã®ã¢ãã¯ã¯å¿ è¦ãªããªãã¨æã£ã¦åé¤ãã¦ããã°ãããã¦ããã¾ã æ¶ãã¡ããã¡ã ã£ãã¨æ°ã¥ããã±ã¼ã¹ã ä¸è¨ã®ã³ã¼ãã®CODEã£ã¦ã¨ãããåé¤ããã sIDENTIFIER = "[^-+#: ]+" IDENTIFIER = re.compile(sIDENTIFIER) ENHANCER = re.compile("\+\s*(%s)" % sIDENTIFIER) SUPPRESSOR = re.compile("-\s*(%s)" % sIDENTIFIER) BODY = re.compile(":\s*(%s)" % sIDENTIFIER) COD
ãã©ã³ãã¯åãæ¿ããªãï¼-pãªãã·ã§ã³ãä»ããã¨git add -pã®ããã«åhunkãé©ç¨ãããé¸æã§ããï¼ indexã«è¿½å ãã¦ããªãå¤æ´ãæ¶ã æ¢ã«git addãããã®ã¯æ®ãï¼ã«ã¬ã³ããã£ã¬ã¯ããªä»¥ä¸ã®addãã¦ããªãå¤æ´ãå ¨é¨æ¶ãï¼ãã使ãï¼
ã¯ã¼ã¯ããªã¼ã«å ããå¤æ´ã®ãã¡ä¸é¨åã ããaddãããã¨ãã«ã¯ git add -p ããã¨ï¼å¤æ´é¨åãã¨ã«addãããã©ãããé¸æã§ããï¼ éã«git checkout -pã§ï¼ä¸é¨ã®å¤æ´ãæ¶ã(æ£ç¢ºã«ã¯addããã¦ããªã=unstagedãªå¤æ´ããæ¶ã)ãã¨ãã§ããï¼ ãããã°ããªã³ãã®ã³ã¼ããæ¶ãããã¨ããªã©ã«ä¾¿å©ï¼ ã©ã¡ããyãnãªã©ã§é¸æããå¾ã«æ¯åenterãæ¼ãå¿ è¦ãããé¢åã ã git config --global interactive.singlekey true ãå®è¡ãã¦ããã¨ï¼yãnãªã©ãæ¼ããæç¹ã§æ±ºå®ã§ããï¼ # é¸æãã¦git addãããã©ãã決ãã git add -p [file_or_dir] # addããã¦ãªãå¤æ´ããããã«å¯¾ãã¦git checkout git checkout -p [file_or_dir] # git add/check
å¹³ç´ ããQAï¼ ITããå©ç¨ããã ããèª ã«ãããã¨ããããã¾ãã QAï¼ ITã¯ã質åãåçããå ±æãããç·¨éããã¦ãããã¨ã§ãã¹ããªQAãèç©ã§ãããITã¨ã³ã¸ãã¢ã®ããã®åé¡è§£æ±ºã³ãã¥ããã£ã¼ãã¨ãã¦ç´7å¹´ééå¶ããã¦ãã¾ãããããã¾ã§ãµã¼ãã¹ãç¶ãããã¨ãã§ããã®ã¯ãQAï¼ ITã®ã³ã³ã»ããã«å ±æãããã ããé©åãªè³ªåãåçããå¯ãããã ããçãã¾ã®ãæ¯æ´ããã£ãããããã¨èãã¦ããã¾ããéãã¦å¾¡ç¤¼ç³ãä¸ãã¾ãã ããããªãããã¨ã³ã¸ãã¢ã®æ å ±å ¥ææ¹æ³ã®å¤æ§åãQAãµã¼ãã¹å¸å ´ã®ç¶æ³ãï¼ ITã®ä»å¾ã®ã¡ãã£ã¢éå¶æ¹éãªã©ãæ¤è¨ããçµæã2020å¹´2æ28æ¥ï¼éï¼15:00ããã¡ã¾ãã¦QAï¼ ITã®ãµã¼ãã¹ãçµäºãããã¨ã«ãã¾ããã ããã¾ã§ãå©ç¨ãããã ãã¾ããçãã¾ã«ã¯æ®å¿µãªãç¥ããã¨ãªããèª ã«å¿è¦ããæã£ã¦ããã¾ããä½ã¨ãããç解ãããã ãã¾ãã¨å¹¸ãã§ãã QAï¼ ITã®7å¹´éã§çãã¾ã®ç¥è
mercurialããã®é¡æ¨ã§ git ã使ããã¨ãããæ«æã gitã®èª¬ææ¸ãèªãã§åºæ¬çãªæ¦å¿µã¨æä½ãã¾ã¨ãã¦ã¿ãã åç §ãã説ææ¸ã¯æ¬¡ã®2ã¤ã Git - Book Git ã¦ã¼ã¶ããã¥ã¢ã« (ãã¼ã¸ã§ã³ 1.5.3 以éç¨) åä½ã¯ git version 1.7.10.4 ã§ç¢ºèªããã åºç¤æ¦å¿µ ã³ããã ãã¡ã¤ã«ããªã¼ã®ããæç¹ã§ã®ã¹ãããã·ã§ãããmercurialã§ã®changesetãã³ãããã¯ã61c4efc3ã ã®ãããª16é²æ°ã®çªå·ãä»ãããã¦ãããgitã³ãã³ãã®å¼æ°ã§ã³ããããæå®ããã¨ãã¯ãã®çªå·ã使ãã ãã©ã³ã éçºã©ã¤ã³ãã³ãããã®é£ãªããåä½ä¸ã¯ãã³ããããæããã¤ã³ã¿ã¨èãã¦ããããã®æå³ã§ã¯ããã©ã³ãã¯ãä¸é£ã®ã³ãããã®ææ°ãæãã¦ããã¨èãããã¨ãã§ãããã³ãããã®é£ãªãã¯éä¸ããåå²ã§ãããããè¤æ°ã®ãã©ã³ããæã¤ãã¨ãã§ãããgitã³ãã³ãã§
çãããtigã³ãã³ããæ´»ç¨ãã¦ãã¾ããï¼ tigã¯ãã³ã³ã½ã¼ã«ä¸ã§ä½¿ããgitãã©ã¦ã¶ã§ããå®ã¯ãã£ã¨ããã ã®ããããªgit logã ã¨æã£ã¦ããã®ã§ãããæ¬å½ã¯ãããªãã¨ã¯ããã¾ãããããªã使ãããã¤ãªã®ã§ãã ã¤ã³ã¹ãã¼ã« ã½ã¼ã¹ã³ã¼ã: https://github.com/jonas/tig ã¤ã³ã¹ãã¼ã«æ¹æ³: https://github.com/jonas/tig/blob/master/INSTALL.adoc ãã®è¾ºããåèã«ãã¦ã¿ã¦ãã ããã詳細ã¯å²æãã¾ãã åºæ¬ã®ä½¿ãæ¹ ãã®ç¶æ ã®å·®åãæ±ã£ã¦ããã¾ãããã¤ãã®ããã ã¨ãããªæãã git logãç´ æµã«ãã¸ã¥ã¢ã©ã¤ãºããã¦ã¾ãããã®ç»é¢ãmain viewã¨ããã¾ãã ããã§ã¨ã³ã¿ã¼ãæ¼ãã¨ãä¸ååã«å·®åã®è©³ç´°ï¼diff viewï¼ã表示ããã¾ãã ä¸ç¢å°ã§ãUnstaged changesã®å·®åãè¦ã¦ã¿ãã¨ãããª
jonas/tig ã¯ç¾å¨ãæ´»çºã«éçºãç¶ç¶ãã¦ããã次ã®ãã¼ã¸ã§ã³ã¢ãããå¾ ããã¾ãã 2013å¹´8æã«ãªãªã¼ã¹ãããtig 1.2.1ããç¾å¨ã¾ã§ã®masterã®å·®åã«ãããã çè ãæ°ã«ãªãæ°æ©è½ã»ä¿®æ£ç¹ãç´¹ä»ãã¦ã¿ã¾ãã â» masterãã©ã³ãã®å·®åã追ã£ã¦ããã®ã¿ã®ãã tig 1.3 ã«ç¢ºå®ã«å ¥ãä¿è¨¼ã¯ããã¾ããã å¤é¨ã³ãã³ãããã¤ã³ãããæã®æ¥é è¾ ! ããªãã·ã§ã³æ±ãã« User-defined commands no longer need to be prefixed with '!' ãã¼ãã¤ã³ãã§å¤é¨ã³ãã³ããè¨å®ããæã¯æ¥é è¾ã« ! (ãã©ã¢ã°ã©ã¦ã³ãã§å®è¡ï¼ããã㯠@ ï¼ããã¯ã°ã©ã³ãã§å®è¡ï¼ãå¿ é ã§ããã次ã®ãããªå½¢ã§ããããã«ä¸å¯§ãªtigã®è¨å®ã¬ã¤ãï¼ãã¼ãã¤ã³ãæ¦è«ç·¨ï¼ ã§ããã®å½¢ã§ç´¹ä»ãã¦ãã¾ãã
**ãupstreamã®masterãã©ã³ãããã¼ã¸ãããã¨ããã大éã®ã³ã³ããªã¯ããçºçããã**ãã¨ãããã¾ãããï¼ ç§ã¯ããããã¾ã **ããã£ãã£ã¨ã³ã³ããªã¯ãã解æ¶ãã¦ããã©ãããããæéåãããã®ãã©ã³ãããã£ããããã·ã¥ããããªãã**ã¨ãããã¨ãããã¾ãããï¼ ç§ã¯ããããã¾ã ã§ãããæªå¦çã®ã³ã³ããªã¯ããæ®ããã¾ã¾ã³ããããããã¨ãã¦ãã $ git commit error: 'commit' is not possible because you have unmerged files. hint: Fix them up in the work tree, hint: and then use 'git add/rm <file>' as hint: appropriate to mark resolution and make a commit, hint: o
I've always thought of git reset and git checkout as the same, in the sense that both bring the project back to a specific commit. However, I feel they can't be exactly the same, as that would be redundant. What is the actual difference between the two? I'm a bit confused, as the svn only has svn co to revert the commit. ADDED VonC and Charles explained the differences between git reset and git ch
ãã使ã Git ã³ãã³ãèªåç¨ã¡ã¢ã§ãã ãããã®ã³ãã³ãã®çµã¿åããã§ãªãã¨ãéçºã¯ã§ãã¦ãã¾ããæ°ããã³ãã³ããè¦ãããéæ追è¨ã ç®æ¬¡ åºæ¬æä½ ãã©ã³ãæä½ tag æä½ stash æä½ å¤æ´ãããç´ã rebase -i diff log ãªã¢ã¼ããã©ã³ããå ¨åé¤ããã¯ã³ã©ã¤ãã¼ ãªã¢ã¼ããã©ã³ããå ¨é¨ãã§ãã¯ã¢ã¦ãããã¯ã³ã©ã¤ãã¼ åºæ¬æä½ git init Git 管çãéå§ãããã«ã¬ã³ããã£ã¬ã¯ããªã« .git ãä½æãããã git add hoge.txt 対象ãã¹ãã¼ã¸ã³ã°ã¨ãªã¢ã«è¿½å ã git status ã¯ã¼ã¯ããªã¼ã¨ã¹ãã¼ã¸ã³ã°ã¨ãªã¢ã®ç¶æ³ã表示 git commit -m 'commit message' ã¹ãã¼ã¸ã³ã°ã¨ãªã¢ã®æ å ±ããªãã¸ããªã«åæ ã git rm hoge.txt 対象ãã¯ã¼ã¯ããªã¼ã¨ã¹ãã¼ã¸ã³ã°ã¨ãªã¢ããåé¤ã git mv hoge
Perlå ¥å¦å¼ å ¨6åã®Perlå ¥éè¬åº§ãæ±äº¬ã大éªãæ²ç¸ãæå¹ã§éå¬ã(æ±äº¬ã¯4æã¨10æã¹ã¿ã¼ãããã以å¤ã¯5æã¹ã¿ã¼ã) YAPC::Japan Perlã軸ã¨ããITã«é¢ããå ¨ã¦ã®äººã®ããã®ã«ã³ãã¡ã¬ã³ã¹ã æ±äº¬ å祥寺.pm äºåç°.pm å¤§éª ãªã«ãPerl æ²ç¸ æ²ç¸.pm
ãã®è¨äºã§ã¯ãdetached HEAD ãã©ãããç¶æ ãªã®ãã git ã®å é¨æ§é ããèªã¿è§£ãã¾ãã ããªãã¯ããã®2ã¤ã®ã³ãã³ããã©ãéããçããããã§ããããï¼ åã: ä¸ã® 2 ã¤ã®ã³ãã³ãã¯åãã§ããããï¼éãã§ããããï¼ A: git checkout <ãã©ã³ãå> B: git checkout <ãã©ã³ãã®æãSHA1> æ£è§£ã¯ãéã ã§ãã ãããçãã«è©°ã¾ã£ã¦ãã¾ã£ãå ´åã¯ããã²ãã®è¨äºãèªãã§ã¿ã¦ãã ããã ãã®è§£èª¬ã®ä¸ã§ãä¸ã®2ã¤ã®ã³ãã³ããã©ãéãã®ããè¦ãã¦ãã¾ãã ï¼ã¡ãã£ã¨ã ã宣ä¼: å¦çåãã« git challenge ã¨ããã¤ãã³ããéãã¦ãã¾ããããã¤ã git ã«ã¾ã¤ããåé¡ãå ¬éãã¦ããã®ã§ãèå³ãããæ¹ã¯ãã£ã¬ã³ã¸ãã¦ã¿ã¦ãã ããï¼: http://alpha.mixi.co.jp/entry/2015/11/24/083300 ï¼ deta
gitã§ä½ããæ»ãããæããã¤ãã©ã®ã³ãã³ãå©ããå¿ããã®ã§ã¡ã¢ ã¯ã¼ãã³ã°ããªã¼ãå ã«æ»ã ãã¡ã¤ã«ç·¨éãããã©ã¾ã addãã¦ãªãæ $ git checkout . $ git checkout -- . $ git checkout HEAD -- .ã©ããHEADã®ç¶æ ã«ã¯ã¼ãã³ã°ããªã¼ãæ»ãã¦ãããã(çµæãåããªã ãã§æåã¯éããã ãããã©ã»ã»ã») "--"ãè¬ãªãã ãã©ãhelpãè¦ã¿ãã¨ãããªä¾ããã£ãã If you have an unfortunate branch that is named hello.c, this step would be confused as an instruction to switch to that branch. You should instead write: $ git checkout -- hello.c ãªãã»ã©ãã
ã¿ãªãããããã«ã¡ã¯ï¼ æè¿ã«ã¼ã³ãã¡ã¯ããªã¼4ãå§ãã¾ããå¿ç°ã§ãã ç§ã«ã¨ã£ã¦ç§å ´ç©èªç³»ã¯ãã©ã¼ã½ããã§ãã ãã¦ä»åã¯ãgit checkoutã«ã¤ãã¦è¦ã¦ããããã¨æãã¾ãã ãªãã ãé·ããªã£ã¡ãã£ã¦ãã¿ã¾ããã ååã¾ã§ã®ãããã ã»ã³ãããã®æµããåå²ãããããã©ã³ããæ©è½ ã»å¤§ããªæ¹ä¿®ã¯ãã©ã³ããåã£ã¦è¡ãã ã»ãã©ã³ãå士ã®ãã¼ã¸ãã§ãã ååã¾ã§ã§ãåºæ¬çãªgitã®èãæ¹ã¨ããã©ã³ããåã£ã¦éçºããããæ¹ã«ã¤ãã¦ãç´¹ä»ãã¾ããã ã»ã»ã»ä»ã¾ã§ãã¡ã¤ã«ãç·¨éãã¦ã³ãããããããã¨ããã¨ããã¾ã§ãããã£ã¦ãã¾ããã§ãããã ãã®ã¨ãã³ãããããç¶æ ã¾ã§æ»ãããã¨ãããã¨ãããã¾ãããï¼ ãã¼ã¸ã§ã³ã管çãã¦ãããã ãããæ»ãã¦å½ç¶ã ãï¼ã¨æãã¾ãããï¼ ã©ããã£ã¦ä»ã®ç¶æ ããããã®ã³ãããã¾ã§ãã®ãã¡ã¤ã«ãæ»ããã ããã»ã»ã» ãããªã¨ãã«ä½¿ãã®ãããã®ããã§ãã¯ã¢ã¦ããã¨ãã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}