git fetch --all
git reset --hard origin/{branch name}
git config --list
git config --global -e
# Set USER INFO
git config --global user.email "email@email.com"
git config --global user.name "userName"
code = vscode
subl = sublime
// 보낼 때 \r를 제거해서 보내고 받을 때 \r를 추가해준다.
Window \r\n
Mac \n
git config --global core.autocrlf true
git config --global core.autocrlf input
git config --list
ls -al
git init
ls -al
start/open .git # Master Branch
rm -rf .git # Remove Git
git config --global alias.stat status
종류
echo *.log > .gitignore
다양한 형식 가능
.log
build/.log
build/
git diff
git diff --staged
-1 +1 첫번째 줄
- 삭제된 것
+ 추가된 것
git config --global -e
.gitconfig add
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
git commit ||
git commit -m "new msg"
git log
# Skip Staging area and commit
git commit -am "skip staging"
git status -s
echo hello world > a.txt
ls
echo hello world > b.txt
echo hello world > c.txt
ls
git status
git add a.txt
git status
git add *.txt
git status
git config --global core.autocrlf
echo change >> a.txt
git status
history
git rm --cached *
git status
git add *
git status
rm a.txt
git status
git add a.txt
git status -s # short A - add M - modified
https://git-scm.com/docs
https://www.youtube.com/watch?v=Z9dvM7qgN9s