헤르메스 LIFE

[Git] Windows 에서 Git bash 설정 본문

장난감들

[Git] Windows 에서 Git bash 설정

헤르메스의날개 2024. 4. 28. 23:15
728x90

0. 목적

- Linux 를 사용했다가 다시 Windows 로 회귀했습니다.

- Linux 의 편한 점이 있었고, 그 편한 점을 잊을 수가 없는거죠.이전에 사용했던. Bash CLI의 장점을....

- 일단 뭐가 어딧는지 알면 나중에 수정하기 편함.

1. Windows용 Git 환경

$ git --version
git version 2.44.0.windows.1

2. Git bash HOME ( "cd ~" 명령으로 이동하는  )

# Git Bash 경로
# /c/Users/[사용자 계정]
# Windows CLI 경로
# c:/Users/[사용자 계정]

3. C 드라이브로 이동

# cd /c

4. "cd /etc" 란?

- "C:\Program Files\Git\etc" 경로를 말합니다. 하지만, "pwd" 를 확인하면 "/etc" 만 보여집니다.

5. Git Bash에서 'll' 의 정의 ( alias 를 설정 할 수 있습니다. )

- "C:\Program Files\Git\etc\profile.d\aliases.sh" 에서 확인 할 수 있습니다.

- aliases.sh

# Some good standards, which are not used if the user
# creates his/her own .bashrc/.bash_profile

# --show-control-chars: help showing Korean or accented characters
alias ls='ls -F --color=auto --show-control-chars'
alias ll='ls -l'
alias goServer='cd /c/Octopus/workspace/EurekaServer'
alias goGateway='cd /c/Octopus/workspace/EurekaGateWay'
alias goService01='cd /c/Octopus/workspace/EurekaService01'
alias goService02='cd /c/Octopus/workspace/EurekaService02'

case "$TERM" in
xterm*)
	# The following programs are known to require a Win32 Console
	# for interactive usage, therefore let's launch them through winpty
	# when run inside `mintty`.
	for name in node ipython php php5 psql python2.7 winget
	do
		case "$(type -p "$name".exe 2>/dev/null)" in
		''|/usr/bin/*) continue;;
		esac
		alias $name="winpty $name.exe"
	done
	;;
esac

6. Git Config

- "C:\Program Files\Git\etc\gitconfig" 파일에서 확인 할 수 있습니다.

 

[diff "astextplain"]
	textconv = astextplain
[filter "lfs"]
	clean = git-lfs clean -- %f
	smudge = git-lfs smudge -- %f
	process = git-lfs filter-process
	required = true
[http]
	sslBackend = openssl
	sslCAInfo = C:/Program Files/Git/mingw64/etc/ssl/certs/ca-bundle.crt
[core]
	autocrlf = true
	fscache = true
	symlinks = false
	editor = \"C:\\\\Program Files\\\\Notepad++\\\\notepad++.exe\" -multiInst -notabbar -nosession -noPlugin
[pull]
	rebase = false
[credential]
	helper = manager
[credential "https://dev.azure.com"]
	useHttpPath = true
[init]
	defaultBranch = master

 


https://hermeslog.tistory.com/685

 

[Git] Git 명령어

사용하는 Git 명령어를 정리해봤습니다. 계속 수정 변경해서 추가할 예정입니다. # 전역 사용자 등록 $ git config --global user.name 'hermeswing' # 전역 사용자 이메일 등록 $ git config --global user.email 'hermeswi

hermeslog.tistory.com

 

728x90