2019-03-11

git command


### git tree로 보기
$ git log --graph
$ git log --pretty=format:"%h %s" --graph


### git diff
# 두 브랜치의 특정 폴더 비교
$ git diff branch1..branch2 folder/

# 두 브랜치 - 특정 폴더 제외하고 비교
$ git diff branch1..branch2 -- . ':!folder_exclude'


### git rename branch
$ git branch -m old_branch_name new_branch_name
$ git branch -m new_branch_name


### git - disable color ui
git color ui 질문 "Enable color display in this user account (y/N)?" 안뜨게 하기
$ git config --global color.ui false


### git difftool : meld
# git difftool config
$ git config --global diff.tool meld

# git difftool 실행(meld) 시 dbus 에러 발생 시 해결 방법
--- 에러 내용 ---
(meld:16516): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Failed to connect to socket /tmp/dbus-la2QE9V9o8: Connection refused
------------------
--- 해결 방법 ---
$ eval $(dbus-launch --sh-syntax)
$ export DBUS_SESSION_BUS_ADDRESS
$ export DBUS_SESSION_BUS_PID
-------------------

// 브랜치 비교
$ git difftool branch_a..branch_b

// folder 형식으로 비교
$ git difftool --dir-diff branch_a..branch_b


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.