Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
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 31
Archives
Today
Total
관리 메뉴

KSI일기장

0524Git 시작부터 파일 올리기 본문

Server

0524Git 시작부터 파일 올리기

MyDiaryYo 2023. 5. 24. 18:45

git init

user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project
$ git init
Initialized empty Git repository in C:/Users/user2/Desktop/gitWorkspace/final_project/.git/
gi
user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (master)
$ git branch -M main

user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (main)
$ git remote add origin https://github.com/jbjeon2/Final_Camp.git

user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (main)
$ git pull
remote: Enumerating objects: 571, done.
remote: Counting objects: 100% (571/571), done.
remote: Compressing objects: 100% (291/291), done.
remote: Total 571 (delta 156), reused 547 (delta 139), pack-reused 0
Receiving objects: 100% (571/571), 1.90 MiB | 3.40 MiB/s, done.
Resolving deltas: 100% (156/156), done.
From https://github.com/jbjeon2/Final_Camp
 * [new branch]      YJdawn      -> origin/YJdawn
 * [new branch]      development -> origin/development
 * [new branch]      eunju       -> origin/eunju
 * [new branch]      jb          -> origin/jb
 * [new branch]      main        -> origin/main
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> main


user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (main)
$ git branch -a
  remotes/origin/YJdawn
  remotes/origin/development
  remotes/origin/eunju
  remotes/origin/jb
  remotes/origin/main

user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (main)
$ git checkout development
Switched to a new branch 'development'
branch 'development' set up to track 'origin/development'.

user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (development)
$ git checkout -b ksi
Switched to a new branch 'ksi'

user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (ksi)
$ git add .

user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (ksi)
$ git commit -m "first commit"
On branch ksi
nothing to commit, working tree clean

user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (ksi)
$ git status
On branch ksi
nothing to commit, working tree clean

user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (ksi)
$ git push
fatal: The current branch ksi has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin ksi

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


user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (ksi)
$ git push --set-upstream origin ksi
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote:
remote: Create a pull request for 'ksi' on GitHub by visiting:
remote:      https://github.com/jbjeon2/Final_Camp/pull/new/ksi
remote:
To https://github.com/jbjeon2/Final_Camp.git
 * [new branch]      ksi -> ksi
branch 'ksi' set up to track 'origin/ksi'.

user2@DESKTOP-GQTOLJ6 MINGW64 ~/Desktop/gitWorkspace/final_project (ksi)
$