관리 메뉴

Silver Library (Archived)

Git - why git push is not working on VSCode? 본문

Personal DB

Git - why git push is not working on VSCode?

Chesed Kim 2021. 2. 22. 15:02
반응형

Problem.

I had no idea why on earth I cannot upload my work through VScode terminal.

 

git push origin master

git push -u origin master

 

None of them worked...why?

 

Solution.

You must pull your repository first as soon as you set this:

1. git remote add origin "your repository URL"

2. git pull origin master --allow-unrelated-histories

 

Oh my god...Guess I have to use Github Desktop for this repository...or maybe another solution exists.

 

Found the solution! Check this if you are suffernig from the branch name issue!

docs.github.com/en/github/administering-a-repository/changing-the-default-branch

 

Source:

webnautes.tistory.com/1422

 

Visual Studio Code에서 Github에 업로드하는 방법

Visual Studio Code에서 Github에 코드를 업로드하는 방법을 다룹니다. 1. git를 설치합니다. 윈도우라면 https://www.git-scm.com/downloads 에서 윈도우용을 다운로드 받아 설치합니다. 옵션 변경없이 디폴트로..

webnautes.tistory.com

stackoverflow.com/questions/46877667/how-to-add-a-new-project-to-github-using-vs-code/63898638#63898638

 

How to add a new project to Github using VS Code

All the tutorials i've seen till now shows to first create a repository on github, copy the link go to vscode and git clone it and from that on, you can do commits and pushes. Is that the right way...

stackoverflow.com

yangsu.github.io/pull-request-tutorial/

 

Pull Request Tutorial by yangsu

Pull Request Tutorial What is a Pull Request? From Github's Using Pull Requests Page Pull requests let you tell others about changes you've pushed to a GitHub repository. Once a pull request is sent, interested parties can review the set of changes, discus

yangsu.github.io

stackoverflow.com/questions/292357/what-is-the-difference-between-git-pull-and-git-fetch

 

What is the difference between 'git pull' and 'git fetch'?

What are the differences between git pull and git fetch?

stackoverflow.com

gitbetter.substack.com/p/how-to-change-git-default-branch

 

How to change git default branch from master

Easily rename the default branch master to other name

gitbetter.substack.com

 

'Personal DB' 카테고리의 다른 글

Python If, else  (0) 2021.02.23
Python - List, and further (append, remove...)  (0) 2021.02.23
Git - How to use reset (back to the previous commit)?  (0) 2021.02.22
Python - grammar note & example  (0) 2021.02.22
Git - EP 1  (0) 2021.02.20