一つ前のコミットを修正したいときは、 git commit --amend で事足りますが、複数commitを修正したいときには、rebase -iを使います。
3つ前のcommitまで指定。
$ git rebase -i HEAD~3
こんな編集画面になります。
一つ前のコミットを修正したいときは、 git commit --amend で事足りますが、複数commitを修正したいときには、rebase -iを使います。
3つ前のcommitまで指定。
$ git rebase -i HEAD~3
こんな編集画面になります。
git log のoneline, statオプション
$ git log --oneline --stat
これをエイリアス登録
$ git config --global --add alias.ls 'log --oneline --stat'
#splice 基本的に配列の要素削除を行う関数。
my @a = qw/10 20 30 40 50 60 70 80/;
my $n = 2;
my $m = 3;
###引数1つ
As noted previously, pass in the --no-commit flag, but to avoid a fast-forward commit, also pass in --no-ff, like so:
$ git merge --no-commit --no-ff $BRANCH
This will allow you to examine/undo the merge, even if it is a fast-forward merge.
これで問題なければ後はcommitすればOK.
refs.[http://stackoverflow.com/questions/501407/is-there-a-git-merge-dry-run-option]
###assume-unchanged ファイルの変更を無視する。
git update-index --assume-unchanged filename
###no-assume-unchanged この設定を取り消す。
git update-index --no-assume-unchanged filename
| crontab設定の時、EDITORをvimに指定してやると、vimの各種便利機能が使えて便利。 | |
| つまりこんなかんじで実行。 | |
| ``` | |
| EDITOR=vim && crontab -e | |
| ``` |
| 日付からunixtimeを得るshellscriptコード | |
| ``` | |
| $ date -d yesterday +%F | |
| 2013-05-17 | |
| $ date -d 2013-05-17 +%s | |
| 1368716400 | |
| ``` |
homebrewのuninstall手順
cd `brew --prefix`
rm -rf Cellar
brew prune
rm `git ls-files`
rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
rm -rf .git
rm -rf ~/Library/Caches/Homebrew
こういうときは、、
$ git commit
error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.
こうして core.editor に /usr/bin/vim を指定するとOK
git config --global core.editor "/usr/bin/vim"
#How to install my-boxen
install Xcode & create github account.
create /opt/boxen
sudo mkdir -p /opt/boxen
sudo chown $USER:admin /opt/boxen