์คํ์์ค ํ๋ก์ ํธ์ ์ฒ์์ผ๋ก ๊ธฐ์ฌํ๋ฉด์ ๊ฒช์๋ ์ํ์ฐฉ์ค์ ํด๊ฒฐ ๊ณผ์ ์ ์์ธํ ๊ธฐ๋กํด๋ณด๊ฒ ์ต๋๋ค. Git, GitHub, Vim ๋ฑ ๋๊ตฌ๋ค์ ๋ค๋ฃจ๋ฉด์ ๋ฐฐ์ด ์ ๋ค์ ๊ณต์ ํ๊ฒ ์ต๋๋ค.
๋์ ํ๋ก์ ํธ: qodo-ai/pr-agent
clip_tokens
ํจ์์ ๋จ์ ํ
์คํธ ๋ฐ ๋ฌธ์ํ ๊ฐ์ ์์ฒญํ ์์ ํ๊ฒฝ:
qodo-ai/pr-agent
group-3-sPRinter/pr-agent
TaskerJang/pr-agent
E:\pr-agent>git remote -v
origin https://github.com/group-3-sPRinter/pr-agent.git (fetch)
origin https://github.com/group-3-sPRinter/pr-agent.git (push)
ํ fork์์ ์์ ์ ์๋ฃํ ์ํ์์, ์๋ณธ ๋ ํฌ์งํ ๋ฆฌ์ ๊ฐ์ธ ๊ธฐ์ฌ๋ก PR์ ๋ณด๋ด์ผ ํ๋ ์ํฉ์ด์์ต๋๋ค.
# ์๋ณธ ์ ์ฅ์๋ฅผ upstream์ผ๋ก ์ถ๊ฐ
git remote add upstream https://github.com/qodo-ai/pr-agent.git
# ๊ฐ์ธ fork๋ฅผ myfork๋ก ์ถ๊ฐ
git remote add myfork https://github.com/TaskerJang/pr-agent.git
# ํ์ธ
git remote -v
ํ ์์ ์ ํ๊ธ๋ก ์์ฑํ ์ปค๋ฐ ๋ฉ์์ง๋ค:
cf0e430c docs: clip_tokens ํจ์ docstring ๊ฐ์ ๋ฐ ์์ ์ถ๊ฐ
62e82e4e test: clip_tokens ํจ์ ํฌ๊ด์ ์ธ ๋จ์ ํ
์คํธ ์ถ๊ฐ
์คํ์์ค ๊ธฐ์ฌ ์์๋ ์์ด ์ปค๋ฐ ๋ฉ์์ง๊ฐ ํ์ํ์ต๋๋ค.
git rebase -i HEAD~2
๋ฌธ์ ๋ฐ์: Vim ์ค์ ํ์ผ ์ถฉ๋
E325: ATTENTION
Found a swap file by the name "/e/pr-agent/.git/rebase-merge/.git-rebase-todo.swp"
# ์ค์ ํ์ผ ์ญ์
rm /e/pr-agent/.git/rebase-merge/.git-rebase-todo.swp
# ๋๋ Windows์์
del ".git\rebase-merge\.git-rebase-todo.swp"
๋ชจ๋ ์ ํ:
i
: Insert ๋ชจ๋ ์ง์
Esc
๋๋ Ctrl+C
: Normal ๋ชจ๋๋ก ๋ณต๊ทCtrl+[
: Esc ๋์ํธ์ง ์์ :
pick
์ reword
๋ก ๋ณ๊ฒฝํ์ฌ ์ปค๋ฐ ๋ฉ์์ง ์์ ์ค์ ์ ์ฅ ๋ฐ ์ข ๋ฃ:
:wq
: ์ ์ฅํ๊ณ ์ข
๋ฃ:q!
: ์ ์ฅํ์ง ์๊ณ ๊ฐ์ ์ข
๋ฃINSERT ๋ชจ๋์์ ๋น ์ ธ๋์ค์ง ๋ชปํ๋ ๋ฌธ์
Esc
ํค๊ฐ ์๋ํ์ง ์์ ๋: Ctrl+C
์ฌ์ฉ์ค์ ํ์ผ ์ถฉ๋
D
(Delete) ์ต์
์ ํ์ฌ๋ฌ ์ค ์ปค๋ฐ ๋ฉ์์ง ์ ๋ ฅ
git commit --amend -m "docs: improve clip_tokens function docstring and add examples
- Enhanced function documentation with clearer descriptions
- Added practical usage examples
- Improved parameter and return value documentation"
git status
# On branch feature/clip-tokens-tests-and-docs
# No commands done.
# Next commands to do (2 remaining commands):
# pick 62e82e4e test: clip_tokens ํจ์ ํฌ๊ด์ ์ธ ๋จ์ ํ
์คํธ ์ถ๊ฐ
# pick cf0e430c docs: clip_tokens ํจ์ docstring ๊ฐ์ ๋ฐ ์์ ์ถ๊ฐ
ํด๊ฒฐ:
# rebase ์ค์ ์์
git rebase --edit-todo
# ๋๋ ์์ ์ค๋จ ํ ์ฌ์์
git rebase --abort
# ์ต์ ์ปค๋ฐ๋ถํฐ ๊ฐ๋ณ ์์
git commit --amend -m "์๋ก์ด ์ปค๋ฐ ๋ฉ์์ง"
# ๊ทธ ๋ค์ ์ปค๋ฐ ์์ ์ ์ํ rebase
git rebase -i HEAD~2
git log --oneline
e2586cb6 (HEAD -> feature/clip-tokens-tests-and-docs) docs: improve clip_tokens function docstring and add examples
1bc0d488 test: add comprehensive unit tests for clip_tokens function
git push myfork feature/clip-tokens-tests-and-docs
ํ๊ธ๋ก ์์ฑํ PR ์ค๋ช ์ ์์ด๋ก ๋ณํ:
## Pull Request Summary
This PR addresses Issue #1793 by adding comprehensive unit tests and improving documentation for the `clip_tokens` function.
## Key Changes
- Added 21 comprehensive unit tests in `tests/unittest/test_clip_tokens.py`
- Completely improved docstring for `clip_tokens` function
- Maintained perfect backward compatibility
Remote ์ ์ฅ์ ๊ด๋ฆฌ์ ์ค์์ฑ
์ปค๋ฐ ๋ฉ์์ง ์์ ๋ฐฉ๋ฒ๋ค
# ์ต์ ์ปค๋ฐ๋ง ์์
git commit --amend -m "์ ๋ฉ์์ง"
# ์ฌ๋ฌ ์ปค๋ฐ ์์
git rebase -i HEAD~n
Rebase ํธ๋ฌ๋ธ์ํ
# ๋ฌธ์ ๋ฐ์ ์ ์ค๋จ
git rebase --abort
# ์ค์ ํ์ผ ์ ๋ฆฌ
rm -rf .git/rebase-merge
ํ์ ๋ช ๋ น์ด
i
: ํธ์ง ๋ชจ๋Esc
/Ctrl+C
: ์ผ๋ฐ ๋ชจ๋:wq
: ์ ์ฅ ํ ์ข
๋ฃ:q!
: ๊ฐ์ ์ข
๋ฃ์ค์ ํ์ผ ์ฒ๋ฆฌ
D
: ์ค์ ํ์ผ ์ญ์ R
: ๋ณต๊ตฌQ
: ์ข
๋ฃ์คํ์์ค ๊ธฐ์ฌ๋ฅผ ํ๋ฉด์ Git, Vim, GitHub์ ๋ค์ํ ๊ธฐ๋ฅ๋ค์ ์ค์ ๋ก ์ฌ์ฉํด๋ณผ ์ ์์์ต๋๋ค.
ํนํ:
์ ์ง์ ๊ฒฝํํ ์ ์์ด์ ๋งค์ฐ ๊ฐ์ง ์๊ฐ์ด์์ต๋๋ค.