AI·빅데이터 융합 경영학 Study Note

깃 충돌 나지 않게 pull requests로 올리는 방법 본문

AI·ML

깃 충돌 나지 않게 pull requests로 올리는 방법

SubjectOwner 2024. 7. 18. 17:56

vscode 터미널에서

 

1. 클로닝 하기

(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp# git clone https://github.com/2024-summer-LLM-Bootcamp/business_card.git
Cloning into 'business_card'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 13 (delta 1), reused 12 (delta 0), pack-reused 0
Receiving objects: 100% (13/13), done.
Resolving deltas: 100% (1/1), done.


(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp# ls
LangChain_Class  LangChain_Class.zip  business_card  langchain_env  requirements.txt

 

2. 파일을 업로드할 폴더로 이동
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp# cd business_card/
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# ls
README.md  app.py  base64_to_text.py  text_to_dict.py
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# ls
README.md  app.py  base64_to_text.py  text_to_dict.py

 

3. ???
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# git checkout -b jj
Switched to a new branch 'jj'
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# git status
On branch jj
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   text_to_dict.py

no changes added to commit (use "git add" and/or "git commit -a")
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# git add .

 

4. 로그인 해주기
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# git commit -m "update text_to_dict.py"
Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@8c14869ce6aa.(none)')
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# git config --global user.email "jianlee.mail@gmail.com"
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# git config --global user.name "JLeeq"

 

5. ???
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# git commit -m "update text_to_dict.py"
[jj 217b7a6] update text_to_dict.py
 1 file changed, 120 insertions(+)
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# git status
On branch jj
nothing to commit, working tree clean
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# git push
fatal: The current branch jj has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin jj

To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.

(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card# git push --set-upstream origin jj
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 2.09 KiB | 2.09 MiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
remote: 
remote: Create a pull request for 'jj' on GitHub by visiting:
remote:      https://github.com/2024-summer-LLM-Bootcamp/business_card/pull/new/jj
remote: 
To https://github.com/2024-summer-LLM-Bootcamp/business_card.git
 * [new branch]      jj -> jj
branch 'jj' set up to track 'origin/jj'.
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/business_card#

 

 

???

그러면 vscode 옆구리에 생기는 폴더에 내가 업로드할 파일을 복사 붙여넣기 한 후에

(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/NewSearchPedia_BE# git add .
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/NewSearchPedia_BE# git commit -m "add keyword_generator.py"
[JianLee f3a0ce5] add keyword_generator.py
 1 file changed, 90 insertions(+)
 create mode 100644 keyword_generator.py
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/NewSearchPedia_BE# git push
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 1.67 KiB | 1.67 MiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/2024-summer-LLM-Bootcamp/NewSearchPedia_BE.git
   79c2278..f3a0ce5  JianLee -> JianLee
(langchain_env) root@8c14869ce6aa:~/LLM_Bootcamp/NewSearchPedia_BE#