
JSON だけでなく Word や ODT、 Jpeg や PNG なども
実ファイルを比較時に変換させることができるみたいです。
参考
Git - Git AttributesGit - gitattributes Documentation
設定
*.json diff=json
[diff "json"] textconv = "jq ."
*.json diff=json
[diff "json"] textconv = "jq ."
function peco-git-changed-files(){ git status --short | peco | awk '{print $2}' }
alias -g F='$(peco-git-changed-files)'
function peco-git-hash(){ # git log --oneline --branches | peco | awk '{print $1}' git lg | peco | sed -e "s/^[\*\|][ |\\\/\*]*//g" | awk '{ print $1 }' }
alias -g F='$(peco-git-hash)'
[alias] lg = log --all --graph --decorate --onelinegit lg (log graph) は僕の git log を置き換えるコマンドです。
function peco-git-branch(){ git branch | peco | sed -e "s/^\*[ ]*//g" }
alias -g B='$(peco-git-branch)'
#!/bin/bash for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do git branch --track ${branch#remotes/origin/} $branch done
[merge] ff = false [pull] ff = only
fatal: Not possible to fast-forward, aborting. Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master Error: Command failed: L2:brew updateはい、明らかに git pull でエラーになりました。
fatal: Not possible to fast-forward, aborting. Error: Failed to update tap: caskroom/cask fatal: Not possible to fast-forward, aborting. Error: Failed to update tap: caskroom/versions以下のコマンドを実行して再インストールしてあげれば履歴が綺麗になって動きます。
Two-factor Authentication実際に push 時にパスワードではなくアクセストークンを入力してみると問題なく push することができます。
How does it work for command-line Git?
If you are using SSH for Git authentication, rest easy: you don't need to do
anything. If you are using HTTPS Git, instead of entering your password, enter
a personal access token. These can be created by going to your
application settings page.
% git remote set-url origin git@github.com:wada811/AndroidLibrary-wada811.git % git remote -v origin git@github.com:wada811/AndroidLibrary-wada811.git (fetch) origin git@github.com:wada811/AndroidLibrary-wada811.git (push)参考: Githubの2段階認証を有効にしてgitからの認証が弾かれる時の話 - 頼りないニモニック
machine github.com login wada811 password xxxpersonalaccesstokenxxxコレが一番楽な解決方法ですね。
cd ~ mkdir dotfiles
mv .gitconfig dotfiles mv .gitignore dotfiles mv .vim dotfiles mv .vimrc dotfiles mv .zsh dotfiles mv .zshrc dotfiles
cd dotfiles vi dotfilesInstaller.sh
#! /bin/bash ln -s ~/dotfiles/.gitconfig ~/.gitconfig ln -s ~/dotfiles/.gitignore ~/.gitignore ln -s ~/dotfiles/.vim/ ~/.vim ln -s ~/dotfiles/.vimrc ~/.vimrc ln -s ~/dotfiles/.zsh/ ~/.zsh ln -s ~/dotfiles/.zshrc ~/.zshrc
chmod +x dotfilesInstaller.sh ./dotfilesInstaller.sh
git init hub create git add . git commit -m "Initial commit" git push -u origin master
cd ~ git clone git@github.com:wada811/dotfiles.gitclone したら dotfiles フォルダの dotfilesInstaller.sh を以下のように実行したら移行完了です。
chmod +x dotfilesInstaller.sh ./dotfilesInstaller.sh
#!/bin/sh cd $(dirname $0) for dotfile in .?* do if [ $dotfile != '..' ] && [ $dotfile != '.git' ] then ln -Fis "$PWD/$dotfile" $HOME fi doneDotfilesをGitHubで管理する | fixture.jp
hub clone octocat/Spoon-Knife
cd Spoon-Knife
git checkout -b Spife
vi README.md
git add README.md
git commit -m "Spife is spoon, it's also knife."
hub fork
git push wada811 Spife
hub pull-request
git clone git@github.com:octocat/Spoon-Knife.git
cd Spoon-Knife
git checkout -b Spife
vi README
git add README
git commit README -m "Spife is a spoon, it is also a knife."
git remote add upstream git://github.com/octocat/Spoon-Knife.git
git stash
git checkout master
git pull upstream master
git checkout Spife
git rebase master Spife
git stash pop
git checkout Spife
git checkout -b featureSpife
git rebase -i master
git push origin featureSpife
You may wish to `brew unlink` these brews: opensslのように言われたのですがいらないのがいくつかあったので
You should `brew install` the missing dependencies: brew install readlineのように言われたので brew install readline を実行しました。
Error: Homebrew doesn't know what compiler versions ship with your version of Xcode. Please file an issue with the output of `brew --config`: https://github.com/mxcl/homebrew/issues Thanks!のように言われていたので Xcode と Command Line Tools をアップデートしました。
git version 1.8.4.3
[pager] log = diff-highlight | less show = diff-highlight | less diff = diff-highlight | less文字列単位の差分がある場合は差分にハイライトされたように背景がつきます。
# built application files *.apk *.ap_ # files for the dex VM *.dex # Java class files *.class # generated files bin/ gen/ # Local configuration file (sdk path, etc) local.properties # Eclipse project files .classpath .project # Proguard folder generated by Eclipse proguard/ # Intellij project files *.iml *.ipr *.iws .idea/gitignore/Android.gitignore at master · github/gitignore · GitHub
# Compiled source # ################### *.com *.class *.dll *.exe *.o *.so # Packages # ############ # it's better to unpack these files and commit the raw source # git has its own built in compression methods *.7z *.dmg *.gz *.iso *.jar *.rar *.tar *.zip # Logs and databases # ###################### *.log *.sql *.sqlite # OS generated files # ###################### .DS_Store .DS_Store? ._* .Spotlight-V100 .Trashes Icon? ehthumbs.db Thumbs.dbgit config --global core.excludesfile ~/.gitignore で設定する。
/Users/wada/.zsh/completion ├── _git └── git-completion.bash 0 directories, 2 filesと、tree とか出てきて、なにこれ便利!いいな!と思ったらbrew install treeで使えるようになります。
fpath=(~/.zsh/completion $fpath) autoload -U compinit compinit -urm -f ~/.zcompdump; compinitもした方が良いらしい。
# zsh補完を有効化 fpath=(/usr/local/share/zsh-completions $fpath)変更した .zshrc の設定を有効にする。
git version 1.7.9.6 (Apple Git-31.1) hub version 1.10.2こんな感じに出ればOK!
mkdir Sample cd Sample git init hub create初回はID/PWを尋ねられるので答えたらリポジトリが作られる。
@sys1yagi .DS_Store をリポジトリに入れたいことはたぶん無いと思うので git の global な設定で ignore してる。help.github.com/articles/ignor… に書いてある Global .gitignore のやり方で
— @zaki50 ♎さん (@zaki50) 2012年12月19日
Ignoring files · github:help# Compiled source # ################### *.com *.class *.dll *.exe *.o *.so # Packages # ############ # it's better to unpack these files and commit the raw source # git has its own built in compression methods *.7z *.dmg *.gz *.iso *.jar *.rar *.tar *.zip # Logs and databases # ###################### *.log *.sql *.sqlite # OS generated files # ###################### .DS_Store .DS_Store? ._* .Spotlight-V100 .Trashes Icon? ehthumbs.db Thumbs.db
@vvakame つ Githubへのpushでusername/passwordを省略する方法2つ shoken.hatenablog.com/entry/20120629…
— Kazuyuki Hondaさん (@hakobera) 2012年8月14日
machine github.com login wada811 password xxxxxxx