-
Notifications
You must be signed in to change notification settings - Fork 5
WooKyoung Noh edited this page Jul 9, 2015
·
32 revisions
- 우측 상단에 있는 Fork를 합니다. (origin)
포크한 USER를 기준으로
~/work$ git clone [email protected]:USER/doc.git
~/work$ cd doc
~/work/doc master$ cat .git/config
- .git/config 에 upstream(메인 리파지터리) 추가
[remote "upstream"]
url = [email protected]:juliakorea/doc.git
fetch = +refs/heads/*:refs/remotes/upstream/*
- getting-started 번역 예
~/work/doc master$ git checkout -b getting-started
Switched to a new branch 'getting-started'
~/work/doc master$ cp ../julia/doc/manual/getting-started.rst codex/julia/doc/manual/
~/work/doc master$ cp ../julia/doc/manual/getting-started.rst src/julia/doc/manual/getting-started.rst.txt
- getting-started.rst.txt 는 각 라인의 시작에 다음을 추가 ( https://raw.githubusercontent.com/juliakorea/doc/master/src/julia/doc/manual/introduction.rst.txt 참고 )
++ 번역함
-- 영어 원문
== 변화없음
-
src/julia/doc/manual/getting-started.rst.txt 파일에 번역을 하면 된다
-
scripts/settings.jl에 manual/getting-started.rst 추가
-
./update.sh
# upstream 갱신
git fetch upstream
# 현재 브랜치에 적용
git rebase upstream/master
# 파일 추가
git add .
# 커밋
git commit -m "getting started 번역"
# origin에 푸쉬
git push origin getting-started
# origin에 푸쉬 (강제)
git push origin getting-started --force
- https://github.com/juliakorea/doc 에 풀 리퀘스트 보냄
# 이어서 커밋
git commit --amend
# 최근 두개 커밋 합치기
git rebase -i HEAD~2
# git
c_cyan=`tput setaf 6`
c_red=`tput setaf 3`
c_green=`tput setaf 3`
c_sgr0=`tput sgr0`
parse_git_branch () {
if git rev-parse --git-dir >/dev/null 2>&1
then
gitver=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')
else
return 0
fi
echo -e "" $gitver
}
branch_color () {
if git rev-parse --git-dir >/dev/null 2>&1
then
color=""
if git diff --quiet 2>/dev/null >&2
then
color="${c_green}"
else
color=${c_red}
fi
else
return 0
fi
echo -ne $color
}