git clone -b branch_name https://repository_address directory_name
Please follow and like us:
git clone -b branch_name https://repository_address directory_name
レポジトリをcloneしただけでは、LFSは有効化されていないので注意。
以下のコマンドを実行して、有効化
$ git lfs install
$ git lfs pull
$ softwareupdate --ignore
$ softwareupdate --reset-ignored
開発環境を固定したいとき、展示納品などに有効
$ diff -rq folderA folderB
詳細も表示する場合は、
$ diff -r folderA folderB
Via! https://chalife.tokyo/apple/mac/mac-diff/
$ 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 //直前のコミットに追加
Via! https://qiita.com/kansiho/items/2bacecdb95d752cb38b7
MacをHigh Sierraにアップグレードしたところ、gitが使えなくなってしまった
$ git xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Developerツールを再インストールさせなければならないらしい。
unity$ xcode-select --install xcode-select: note: install requested for command line developer tools
確認ダイアログが出るのでOKを押せば、インストールが始まる。インストールを完了すると、これまで通り、gitが使える様になる。
Via! https://e-yota.com/idle_talk/mac-os-high-sierra_git_xcrun_error/
gitのbranchの名前を変える方法
$ git branch -m [newname]
$ git branch -m [newname] [oldname]
あとから、.gitignoreを設置したけど、一発で.gitignoreを全体に反映させる。
以下のコマンドで、.gitignoreから除外を反映させる
$ git rm --cached `git ls-files --full-name -i --exclude-from=.gitignore`
$ git status $ git commit -m 'Reflected .gitignore'