Mac
⌃ + ` Terminalの表示/非表示
⌃ + T Terminalをアクティブ
⇧ + ⌘ + ] 次のTerminalに切替
⌃ + ` Terminalの表示/非表示
⌃ + T Terminalをアクティブ
⇧ + ⌘ + ] 次のTerminalに切替
git clone -b branch_name https://repository_address directory_name
レポジトリをcloneしただけでは、LFSは有効化されていないので注意。
以下のコマンドを実行して、有効化
$ git lfs install
$ git lfs pull
$ diff -rq folderA folderB
詳細も表示する場合は、
$ diff -r folderA folderB
$ ssh-keygen -yf ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub
Via! https://qiita.com/koudaiii/items/45f9f5929afb0039ffdb
https://kanonji.hatenadiary.com/entry/20110514/1305378873
$ date +%s
commitした後に、追加でファイルをaddしたい場合。git commit --amend
を使う。
$ git commit -m 'Add foo' //コミット $ git add 'hoge.txt' //加え忘れたファイルをadd $ git commit --amend //直前のコミットに追加
gitのbranchの名前を変える方法
$ git branch -m [newname]
$ git branch -m [newname] [oldname]
#!/bin/bash arr=(foo bar hoge) for a in ${arr[@]} do echo $a done
配列宣言は、()で囲んで、スペース区切り。
@を使うと、配列を展開しつつ、for..inで回してくれる。
Via!
http://reiki4040.hatenablog.com/entry/20110208/1297171057
gitから、一度、バージョン管理に入れてしまったファイル/ディレクトリを外す方法
$ git rm --cached [filename]
ディレクトリの場合は、
$ git rm -r --cached [dirname]