Skip to content

Latest commit

 

History

History
107 lines (78 loc) · 2.4 KB

044.md

File metadata and controls

107 lines (78 loc) · 2.4 KB
title
GIT: .gitconfig


git config --global user.email        '[email protected]'
git config --global user.name         'Cicak Bin Kadal'
git config --global core.editor       'vi'
git config --global credential.helper 'cache --timeout=3600'
git config --global pull.rebase       'true'
git config user.email
git config user.name
git config core.editor
git config credential.helper
git config pull.rebase
sleep 1
git config --list
sleep 1
cat $HOME/.gitconfig

(RESULT)

cbkadal@cbkadal:~$ git config --global user.email        '[email protected]'

cbkadal@cbkadal:~$ git config --global user.name         'Cicak Bin Kadal'

cbkadal@cbkadal:~$ git config --global core.editor       'vi'

cbkadal@cbkadal:~$ git config --global credential.helper 'cache --timeout=3600'

cbkadal@cbkadal:~$ git config --global pull.rebase       'true'

cbkadal@cbkadal:~$ git config user.email
[email protected]

cbkadal@cbkadal:~$ git config user.name
Cicak Bin Kadal

cbkadal@cbkadal:~$ git config core.editor
vi

cbkadal@cbkadal:~$ git config credential.helper
cache --timeout=3600

cbkadal@cbkadal:~$ git config pull.rebase
false

cbkadal@cbkadal:~$ sleep 1

cbkadal@cbkadal:~$ git config --list
[email protected]
user.name=Cicak Bin Kadal
core.editor=vi
credential.helper=cache --timeout=3600
pull.rebase=true

cbkadal@cbkadal:~$ sleep 1

cbkadal@cbkadal:~$ cat $HOME/.gitconfig
[user]
	email = [email protected]
	name = Cicak Bin Kadal
[core]
	editor = vi
[credential]
	helper = cache --timeout=3600
[pull]
	rebase = true

cbkadal@cbkadal:~$ 


## rebase: true or false?
  • The recommended value of "pull.rebase" is "true"
  • However --- if you wish --- you might want to switch it to "false"
git config --global pull.rebase       'false'
git config pull.rebase


## Default Branch: master?
  • To set default branch as master:
git config --global init.defaultBranch master
git config init.defaultBranch