Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Collections
- onetoone
- query
- Join
- cursor()
- insertOne
- python
- statement
- DBFilter
- SubqueryFilter
- PreparedStatement
- postgres
- sqlite3
- subquery
- 데이터베이스
- 몽고디비
- javascript
- MySQL
- python데이터베이스연동
- PostgreSQL
- DB
- 서브쿼리
- sql
- MongoDB
- 자바스크립트
- PostgresDB
- 밴쿠버응급실
- DATABASE
- insert_into
- 파이썬
Archives
- Today
- Total
새벽코딩
Git Push rejected (Updates were rejected) error 본문
파이참(PyCharm)에서 터미널을 이용하여 bitbucket에 push를 할때, 아래와 같은 에러가 발생하였다.
PS C:\Users\lunat\Desktop\********\********> git push -u origin master
To https://*************/*******/*******
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://bitbucket.org/*****/******'
To https://*************/*******/*******
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://bitbucket.org/*****/******'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
에러의 원인은 remote 저장소와 local 저장소의 현재 상태가 달라서 발생한것이다.
하지만, 친절하게 에러에 대한 hint로 push전에 pull를 해보았다.
PS C:\Users\lunat\Desktop\*****\*****> git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
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> master
이번엔, 위와같은 문제로 다시 push가 안되었다.
그래서 위에 메세지에서 알려주는대로 다시한번, 시도를 해보았다.
PS C:\Users\lunat\Desktop\*****\****> git branch --set-upstream-to=origin/master master
Total 13963 (delta 3846), reused 13955 (delta 3843), pack-reused 0
remote: Resolving deltas: 100% (3846/3846), done.
To https://bitbucket.org/****/******
78b1e81..8c19c33 master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
해당 명령어로, Branch 'master' 가 'origin'으로 부터 추적이될 수 있도록 셋업이 되었고
remote 저장소에 모든 데이터가 잘 push되었다.
'Programming > git' 카테고리의 다른 글
.gitignore 만들기 (git commit에서 자동 제외) (0) | 2022.10.08 |
---|