Notice
Recent Posts
Recent Comments
ยซ   2024/11   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Archives
Today
In Total
๊ด€๋ฆฌ ๋ฉ”๋‰ด

A Joyful AI Research Journey๐ŸŒณ๐Ÿ˜Š

Git, Mac) ์ด๋ฏธ ์ปค๋ฐ‹ํ•œ Committer ์ด๋ฆ„ ์ผ๊ด„๋กœ ํ•œ ๋ฒˆ์— ๋ณ€๊ฒฝํ•˜๊ธฐ ๋ณธ๋ฌธ

๐Ÿ’ปBootcamp Self-Study Revisionโœจ/Git, GitHub

Git, Mac) ์ด๋ฏธ ์ปค๋ฐ‹ํ•œ Committer ์ด๋ฆ„ ์ผ๊ด„๋กœ ํ•œ ๋ฒˆ์— ๋ณ€๊ฒฝํ•˜๊ธฐ

yjyuwisely 2023. 6. 9. 23:15

์ฒ˜์Œ์— ํ„ฐ๋ฏธ๋„์—์„œ ๊นƒํ—ˆ๋ธŒ ์•„์ด๋””, ๋น„๋ฐ€๋ฒˆํ˜ธ ์„ค์ •ํ•  ๋•Œ
๊นƒํ—ˆ๋ธŒ์—์„œ ๋ฐœ๊ธ‰๋ฐ›์€ ํด๋ž˜์‹ ํ† ํฐ(Tokens(Classic))์„ ๋น„๋ฐ€๋ฒˆํ˜ธ๋กœ ์‚ฌ์šฉํ•œ๋‹ค. 

1) ํด๋” ๊ฒฝ๋กœ๋ฅผ ์ง€์ •ํ•ด ์ฃผ๊ณ 

์˜ˆ์‹œ) cd /Users/yeongjinyu/Documents/github


2) git clone์„ ํ•œ๋‹ค.

์˜ˆ์‹œ) git clone https://github.com/yjyuwisely/Traveling-from-Ulju-gun.git

git clone ๊นƒ์ฃผ์†Œ



3) ํด๋” ๊ฒฝ๋กœ๋กœ ๋“ค์–ด๊ฐ„๋‹ค.
์˜ˆ์‹œ) cd /Users/yeongjinyu/Documents/github/Traveling-from-Ulju-gun


4) ํ„ฐ๋ฏธ๋„์—์„œ ํ•˜๋‹จ์„ ์ˆœ์„œ๋Œ€๋กœ ์ž…๋ ฅํ•œ๋‹ค.
๋ณธ์ธ์˜ ๊นƒํ—ˆ๋ธŒ ์•„์ด๋””์™€ ์ด๋ฉ”์ผ์„ ๋„ฃ๊ณ  Branch ์ด๋ฆ„์„ ๋์—๋‹ค๊ฐ€ ์ ๋Š”๋‹ค. 

4.1)

git filter-branch --env-filter "GIT_AUTHOR_NAME='๊นƒํ—ˆ๋ธŒ์•„์ด๋””'; GIT_AUTHOR_EMAIL='๊นƒํ—ˆ๋ธŒ์ด๋ฉ”์ผ'; GIT_COMMITTER_NAME='๊นƒํ—ˆ๋ธŒ์•„์ด๋””'; GIT_COMMITTER_EMAIL='๊นƒํ—ˆ๋ธŒ์ด๋ฉ”์ผ';" ๋ธŒ๋žœ์น˜์ด๋ฆ„


์˜ˆ์‹œ) git filter-branch --env-filter "GIT_AUTHOR_NAME='yjyuwisely'; GIT_AUTHOR_EMAIL='yjyuwisely@gmail.com'; GIT_COMMITTER_NAME='yjyuwisely'; GIT_COMMITTER_EMAIL='yjyuwisely@gmail.com';" master

(์ค‘๋ณต ๋•Œ๋ฌธ์— overwriteํ•  ๊ฒฝ์šฐ ์•ž์— -f๋ฅผ ๋‘”๋‹ค.
์˜ˆ์‹œ) git filter-branch -f --env-filter "GIT_AUTHOR_NAME='yjyuwisely'; GIT_AUTHOR_EMAIL='yjyuwisely@gmail.com'; GIT_COMMITTER_NAME='yjyuwisely'; GIT_COMMITTER_EMAIL='yjyuwisely@gmail.com';" master)
์„ ์‚ฌ์šฉํ•œ๋‹ค.) 

๋งŒ์•ฝ ๋ธŒ๋žœ์น˜ ๋ฒ„์ „์ด ์—ฌ๋Ÿฌ๊ฐœ๋ผ๋ฉด ํ•˜๋‹จ์„ ์‚ฌ์šฉํ•œ๋‹ค.

์˜ˆ์‹œ) git filter-branch --env-filter "GIT_AUTHOR_NAME='yjyuwisely'; GIT_AUTHOR_EMAIL='yjyuwisely@gmail.com'; GIT_COMMITTER_NAME='yjyuwisely'; GIT_COMMITTER_EMAIL='yjyuwisely@gmail.com';" -- --all


4.2) ํ•˜๋‹จ์˜ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•œ๋‹ค. ์ž์‹ ์˜ branch ์ด๋ฆ„์œผ๋กœ ์ˆ˜์ •ํ•œ๋‹ค.
์˜ˆ์‹œ) git push --force origin master

5) ์™„๋ฃŒ!
๊นƒํ—ˆ๋ธŒ์˜ Repository์— Committer์˜ ์ด๋ฆ„์ด ์ง€์ •ํ•œ ํ•œ ๊ฐœ๋กœ ๋ณ€๊ฒฝ๋œ ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค.


https://blogs.sap.com/2019/07/12/how-to-clone-a-github-repository-to-local-mac-computer/

 

How to clone a GitHub repository to local mac computer | SAP Blogs

0 2 198,388 During development of Node.JS, you may need to clone a GitHub reposity to local mac computer. A repository on GitHub is a remote repository. You can clone the repository to your mac computer in order to create a local copy and sync between the

blogs.sap.com

 

 

[Git] ์ด๋ฏธ ํ‘ธ์‹œ๋œ ์ปค๋ฐ‹๋“ค์˜ ์ž‘์„ฑ์ž(Author) ์ผ๊ด„ ๋ณ€๊ฒฝํ•˜๊ธฐ (feat. GitHub ์ž”๋”” ๋ˆ„๋ฝ)

1. GitHub Contribution (feat. GitHub ์ž”๋””) Git๊ณผ GitHub์„ ์‚ฌ์šฉํ•ด๋ณธ ๊ฐœ๋ฐœ์ž๋ผ๋ฉด ๋ถ„๋ช… Git ์ €์žฅ์†Œ ์ƒ์„ฑ ํ˜น์€ ์ปค๋ฐ‹ ๋“ฑ์˜ ๊ธฐ๋ก์ด GitHub Contribution์ด๋ผ๋Š” ํ˜•ํƒœ๋กœ GitHub์— ๊ธฐ๋ก๋˜๋Š” ๊ฒƒ์„ ๋ณธ ์  ์žˆ์„ ๊ฒƒ์ด๋‹ค. Contributio

it-eldorado.tistory.com

 

์™•์ดˆ๋ณด! Github ์‚ฌ์šฉ๋ฒ• (Mac os)

๊ฐœ๋ฐœ์„ ์ฒ˜์Œ ๋ฐฐ์šฐ๋ฉด์„œ ๊ฐ€์žฅ ์–ด๋ ค์› ๋˜ ๊ฑด ์†Œ์Šค์ฝ”๋“œ๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ๊ฒƒ์ด์—ˆ๋‹ค. ๋น„ ์ „๊ณต์ž์˜€๋˜ ๋‚˜๋Š” ๊ตฌ๊ธ€์— ์˜ฌ๋ผ์™€ ์žˆ๋Š” ๋งŽ์€ Github ๊ด€๋ จ ๋ธ”๋กœ๊ทธ๋ฅผ ๋ดค์ง€๋งŒ ๋„๋Œ€์ฒด ๊ฐœ๋ฐœ์ž๋“ค์€ ์‰ฌ์šด ๋ง๋„ ์™œ ์–ด๋ ต๊ฒŒ ํ•˜๋Š”

sin0824.tistory.com

https://syki66.github.io/blog/2020/12/30/git-change-committer-date.html

 

[git filter-branch] ๊นƒ, COMMITTER_DATE ๋ณ€๊ฒฝํ•˜๊ธฐ - syki66 blog

git rebase, git cherry-pick, git reset ๋“ฑ์„ ์ด์šฉํ•˜์—ฌ ๊ณผ๊ฑฐ ์ปค๋ฐ‹์„ ์ˆ˜์ •ํ•˜๊ณ , github์— push ํ›„ ํžˆ์Šคํ† ๋ฆฌ๋ฅผ ๋ณด๊ฒŒ๋˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ์ปค๋ฐ‹์ด ์ˆ˜์ •์‹œ๊ฐ„ ๊ธฐ์ค€์œผ๋กœ ๋ฐ”๋€Œ์–ด์žˆ๋‹ค. COMMITTER_DATE ๊ฐ’์ด ์ˆ˜์ •์‹œ๊ฐ„์œผ๋กœ ๋ณ€๊ฒฝ

syki66.github.io


git rebase -i <commit_hash> -x "git commit --amend --reset-author -CHEAD"
git rebase -i 5282e95941ee89355c6f9b8e5fc8ee8d69fc88df -x "git commit --amend --reset-author -CHEAD"
git rebase -i --root -x "git commit --amend --reset-author -CHEAD"

728x90
๋ฐ˜์‘ํ˜•
Comments