tmp ã³ãããã®ããã®ç¬èªãµãã³ãã³ã git-now
追è¨[2011/09/26]
- git-now ã®urlãgistããgit-hubã«å¤æ´ãã¾ããã
追è¨[2011/10/17]
- ã©ã¤ã»ã³ã¹ã¯GPLã§ã
ä¸æçãªtmp ã³ãããããç°¡åãªãã°ã¡ãã»ã¼ã¸ã®ã³ãããï¼push åã«ãã°ã¡ãã»ã¼ã¸ãæ´ãã¦ãã¾ãï¼ãä½ãã¨ããä»ã¾ã§âã¿ãããªäºããã¦ãã¾ããã
ã§ãããã使ããªããããããåºæ¥ãã便å©ããã¼ãã¨ãã¤ã¶ããã¦ããããé£ã®äººãä¸æ©ã§ï¼ï½ï½
ã¨ããããªæãã§åºæ¥ãgit-now ã®ç´¹ä»
ç°¡åãªå®è¡ä¾
- ã³ãã³ã
$ git now
ããã§ãç管çããã¦ãããã¡ã¤ã«ã®tmp ã³ããããä½æã§ãã¾ãã
- ã³ãããã¡ãã»ã¼ã¸ä¾
[from now] Tue Dec 7 23:00:24 2010 diff --git a/hello.py b/hello.py index 51cff9f..9e84b86 100644 --- a/hello.py +++ b/hello.py @@ -3,4 +3,4 @@ if __name__ == '__main__': - print 'Hello' + print 'Hello, World!!'
使ãæ¹
- ãããã¯ãã©ã³ãã§ä½æ¥ä¸ã«ãã³ãããã¡ãã»ã¼ã¸ãèãã¦æãæ¢ã¾ã£ããã¨ãããããgit ãªãããã¦ãã
- ä½æ¥ãçµãã£ãããæ´å²ãæ´ãã
- rebase ã§ã³ãããã¡ãã»ã¼ã¸ãæ´ãã( git now --rebase )
- master ã«1ã¤ã®ã³ãããã¨ãã¦ãã¼ã¸ãã¦ãã¾ã( git merge --squash topic-branch )
- push ãã
ã¤ã³ã¹ãã¼ã«æ¹æ³
- https://github.com/toshi-kawanishi/git-now ããgit-now ããã¦ã³ãã¼ãããã
- %GIT_HOME%/libexec/git-core ã«git-now ãç½®ãã
ã½ã¼ã¹
- git-now (rev:ce05ba)
#!/bin/sh PREFIX="from now" MESSAGE="[${PREFIX}] `date`" if [ $# -eq 0 ] then git add -u printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F - elif [ $1 != "--rebase" ] then git add $@ printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F - else FIRST_NOW_COMMIT=`git log --pretty=oneline --grep="${PREFIX}" | tail -n 1 | cut -d " " -f 1` INITIAL_COMMIT=`git log --pretty=oneline | tail -n 1 | cut -d " " -f 1` if [ ${FIRST_NOW_COMMIT} != ${INITIAL_COMMIT} ] then git rebase -i ${FIRST_NOW_COMMIT}^ else WORKING_BRANCH=`git branch -l | grep "*" | cut -d " " -f 2` git checkout ${FIRST_NOW_COMMIT} git commit --amend git rebase --onto HEAD ${FIRST_NOW_COMMIT} ${WORKING_BRANCH} fi fi
ãã«ã
- git-now.txt*1
git-now(1) ========== NAME ---- git-now - Record changes to the repository with a log message from time now and diff SYNOPSIS -------- [verse] 'git now' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p] [--edit | -e] [--all | [--update | -u]] [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--] [<filepattern>...] 'git now' [--rebase] DESCRIPTION ----------- ä¸æçãªã³ããããç°¡åã«ä½æã§ãã¾ãã ãã®ã³ãã³ãã§ä½æããã³ãããã¯--rebase ãªãã·ã§ã³ã§ç°¡åã«å¤æ´ã§ãã¾ãã OPTIONS ------- --rebase 以å¤:: åºæ¬çã«add ã¨åã --reabase:: git-now ã§å¤æ´ããã³ããããæ¸ãæãããã¨ãã§ãã HEAD ãã辿ããä¸çªå¤ãgit-now ã³ãããããrebase ãå§ãã EXAMPLES -------- ç¾å¨æå»ã¨å·®åãã³ããããã°ã«ãã¦ãç管çã®å¯¾è±¡ãã¡ã¤ã«ãå ¨ã¦ã³ããããã ------------ $ git now ------------ Documentation ã®ãµããã£ã¬ã¯ããªãå«ã *.txt ãã¡ã¤ã«ãadd ãã¦ããã ç¾å¨æå»ã¨å·®åãã³ããããã°ã«ãã¦ã³ããããã ------------ $ git now Documentation/\*.txt ------------ ä¸çªå¤ãgit now ã®ã³ãããããrebase ãå§ãã ------------ $ git now --rebase ------------ Author ------ Written by toshi-kawanishi and sinsoku
*1:è±èªã§ãã£ããããã«ãæ¸ããã¨æã£ããã©ãç¡çã ã£ã...orz