create account

DEV] My `.gitconfig` by tabris

View this thread on: hive.blogpeakd.comecency.com
· @tabris · (edited)
$4.99
DEV] My `.gitconfig`
I thought about what to write on Steemit for a while, and decided to share some useful dev tips as my second post.

I saw many developers just use default `.gitconfig` settings, but there're  many useful tunings that can make your day-to-day work a lot easier.

*스팀잇에 이제 막 입문해서, 뭘 써야 하나 좀 고민했었는데.. 개발 관련 팁들을 공유하는 컨셉으로 해보려고 합니다.*
*제 두번째 포스트는 그래서 제 `.gitconfig` 파일입니다.*

*많은 개발자분들이 그냥 기본 세팅으로 GIT을 사용하시는 경우가 많은것 같은데요, 몇가지 설정으로 더 아름다운 개발 환경을 만들어봅시다!*


```
[user]
  # Please do not push your code "Anonymously" if you work with bunch of other team members
  # 협업을 할때는 꼭 이름과 이메일을 설정해서 익명으로 푸시를 하지 말아주세요.
  name = Your name
  email = my@email.com

[color]
  status = auto
  branch = auto
  diff = auto
  ui = auto

[color "diff"]
  meta = yellow bold
  ifrag = magenta bold
  whitespace = red reverse

[alias]
  # Just some shorter alias saving few keyboard typing on frequently used operations
  # 자주쓰는 명령어에 대한 더 짧은 별명을 지어줘서 키보드 타이핑 몇번정도를 줄여보세요 ㅎ
  s = status
  b = branch
  co = commit

  # Find files by name on repository
  # 레포지토리 안에 있는 파일 - 이름으로 검색
  f = "!git ls-files | grep -i"

  # Print how many commits you made so far (could be useful for versioning)
  # 커밋 갯수 카운트 (versioning 하실때 유용합니다)
  count = rev-list --count HEAD

  # This is just a prettier version of git log command - try it! this is my favorite one
  # 더 아름다운 버전의 git log 입니다. 이건 정말 꼭 한번 해보세요! 강력추천입니다 ㅎ
  lg = log --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit


[branch "master"]
  remote = origin
  merge = master

[core]
  # Did you know Mac's default file system is actually case insensitive?
  # This option force your repository to be case sensitive,
  # so you don't have trouble when you deploy them on Linux (which use case sensitive file system)
  # 맥의 파일시스템이 기본적으로 대소문자 구분을 하지 않는다는걸 아셨나요?
  # 리눅스에서는 File과 file 두개의  파일이 동시에 한 디렉토리에 존재 할 수 있지만 맥에서는 불가능합니다.
  # 아래 옵션을 켜서 맥에서 개발한 경우에 리눅스에서 문제가 발생할 수 있는 경우를 미연에 방지할 수 있습니다.
  ignorecase = false

[branch]
  # Prevent `git pull` from making garbage "merge commits" - Use rebase by default
  # `git pull` 할때 쓰레기 merge 커밋을 만들지 않고 rebase를 기본으로 사용하게 합니다.
  autosetuprebase = always

[push]
  default = simple

[remote "origin"]
  push = HEAD
```

---

I'll show you how much better your `git log` can be with the `git lg` command we just set up.
*위의 `git lg` 명령어를 사용한 더 아름다운 버전의 git log 화면 스샷으로 글을 마칩니다 :)*


![git log](https://steemitimages.com/DQmXvi1YjVoAKbDpbwxWhqxuYDaRviyHhCRxumkYjnQ8wjQ/Screen%20Shot%202017-07-02%20at%2018.23.19.png)
<center><em>git log (default)</em></center>


![git lg](https://steemitimages.com/DQmdoauBWQrpxVz3u8XVih9Kw8Fpj4GZ4KFqy2JmQu6gCyi/Screen%20Shot%202017-07-02%20at%2018.20.31.png)
<center><em>git lg (our prettier version)</em></center>
👍  , , , ,
properties (23)
authortabris
permlinkmy-gitconfig
categorykr
json_metadata{"tags":["kr","kr-dev","dev","git","programming"],"image":["https://steemitimages.com/DQmXvi1YjVoAKbDpbwxWhqxuYDaRviyHhCRxumkYjnQ8wjQ/Screen%20Shot%202017-07-02%20at%2018.23.19.png","https://steemitimages.com/DQmdoauBWQrpxVz3u8XVih9Kw8Fpj4GZ4KFqy2JmQu6gCyi/Screen%20Shot%202017-07-02%20at%2018.20.31.png"],"app":"steemit/0.1","format":"markdown"}
created2017-07-02 09:33:09
last_update2017-07-03 10:47:51
depth0
children3
last_payout2017-07-09 09:33:09
cashout_time1969-12-31 23:59:59
total_payout_value3.795 HBD
curator_payout_value1.193 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,771
author_reputation13,487,538,505,917
root_title"DEV] My `.gitconfig`"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id6,991,434
net_rshares644,439,065,223
author_curate_reward""
vote details (5)
@crypto2day ·
Upvoted.
After seeing your last post and this... you have gotten a new follower. Love the blogs,
properties (22)
authorcrypto2day
permlinkre-tabris-201776t13147704z
categorykr
json_metadata{"tags":"kr","app":"esteem/1.4.7","format":"markdown+html","community":"esteem"}
created2017-07-06 17:14:12
last_update2017-07-06 17:14:12
depth1
children0
last_payout2017-07-13 17:14:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length96
author_reputation2,011,344,792,264
root_title"DEV] My `.gitconfig`"
beneficiaries
0.
accountesteemapp
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id7,544,002
net_rshares0
@kdj ·
반갑습니다.
git 제가 쓰는 git alias 입니다.
~~~~
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
tree = log --graph --oneline --all
~~~~
👍  
properties (23)
authorkdj
permlinkre-tabris-my-gitconfig-20170702t153026334z
categorykr
json_metadata{"tags":["kr"],"app":"steemit/0.1"}
created2017-07-02 15:30:30
last_update2017-07-02 15:30:30
depth1
children0
last_payout2017-07-09 15:30:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length170
author_reputation4,188,781,313,300
root_title"DEV] My `.gitconfig`"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id7,027,240
net_rshares1,091,047,335
author_curate_reward""
vote details (1)
@steemitboard ·
Congratulations @tabris! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/firstcomment.png)](http://steemitboard.com/@tabris) You made your First Comment
[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/votes.png)](http://steemitboard.com/@tabris) Award for the number of upvotes

Click on any badge to view your own Board of Honnor on SteemitBoard.
For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard)

If you no longer want to receive notifications, reply to this comment with the word `STOP`

By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-tabris-20170702t110424000z
categorykr
json_metadata{"image":["https://steemitboard.com/img/notifications.png"]}
created2017-07-02 11:04:24
last_update2017-07-02 11:04:24
depth1
children0
last_payout2017-07-09 11:04:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length836
author_reputation38,975,615,169,260
root_title"DEV] My `.gitconfig`"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id6,998,700
net_rshares0