git과 repo 이야기
-------------
-------------
git diff
git diff --cached
git rm <file>
git rm --cached <file> ; unstaging
git reset HEAD <file> ; unstaging
git checkout -- <file>; unmodify
--stat : show modified files
--graph : ascii graph
--pretty : show commit in alternate format
--since, --after
--until,--before
--author
--committer
-------------
git gui = gitk
install xming and set putty X11 forwarding
-------------
-------------
git clone [git url]
git clone [git url] [dir name]
-------------
git pull = fetch + merge
or
git pull = fetch + rebase
or
git pull = fetch
-------------
git push orgin HEAD:remote
git push orgin HEAD:refs/for/BRANCH
refs/for = gerrit server.
Change-ID is for gerrit server.
$ git push ssh://review-android.quicinc.com:29418/PROJECT HEAD:refs/for/BRANCH $ git push ssh://review-android.quicinc.com:29418/PROJECT COMMIT_ID:refs/changes/CHANGE_NUM
git clone git://PATH/PROJECT.git
cd PROJECT
$ git remote
quic
$ git remote -v
quic ssh://git.quicinc.com:29418/platform/vendor/qcom/msm8992 (fetch)
quic ssh://git.quicinc.com:29418/platform/vendor/qcom/msm8992 (push)
-------------
git format-patch HEAD^ scripts/checkpatch.pl 0001-xxxx.patch or git show HEAD | scripts/checkpatch.pl - git format-patch FROM...TO
- How to apply patch
git apply --stat PATCH.patch ; just to check git apply PATCH.patch patch -p1 <PATCH.patch
git am < 000* git am -3 <
-------------
repo init
-------------
git command alias for bash
### Git command
alias gbr='git branch'
alias gcm='git commit'
alias gco='git checkout'
alias gst='git status'
alias gd='git diff'
alias gdf='git diff'
alias gad='git add'
alias gch='git cherry-pick'
alias gcl='git clean -x -f -d'
alias gf='git format-patch'
alias ghe='git help'
alias gres='git reset --hard HEAD'
alias gr='git rebase'
alias gre='git rebase'
alias gl='git log --oneline --decorate'
alias gll='git log --stat --decorate'
alias gs='git show'
alias gbl='git blame'
------------
'Programming' 카테고리의 다른 글
Book - EXCEL Hacks (0) | 2015.09.24 |
---|---|
file/directory 비교 tool - Meld (0) | 2015.09.24 |
bash alias (0) | 2015.09.19 |
codeaurora.org and linaro.org (0) | 2015.09.13 |
Natural Language Processing with Python (0) | 2015.08.24 |