/************* Github 내에 소스코드 삭제방법*********************/
/*문제점: 깃허브에 저장된 폴더나 소스를 삭제할 방법을 몰라**/
/*폴더를삭제하고 commit 했더니 remote와 mach가 안되서 오류가남******/
/*새롭게 로컬에 똑같은 이름폴더를만들고 Merge를 하니까 해결됨****/
/****************************************************************/
/**************** github 다운받고 초기설정 방법******************/
Administrator**** MINGW64 ~/gittemp (master)
$ git config --global user.name "*******"
Administrator**** MINGW64 ~/gittemp (master)
$ git config --global user.email "******"
//글로벌네임 리네임 방법
Administrator**** MINGW64 ~/gittemp (master)
$ git config --global user.name *******
Administrator**** MINGW64 ~/gittemp (master)
$ git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=*****
user.email=*********
Administrator**** MINGW64 ~
$ mkdir gittemp
Administrator**** MINGW64 ~
$ cd gittemp
Administrator**** MINGW64 ~/gittemp
$ git init
Initialized empty Git repository in C:/Users/Administrator/gittemp/.git/
Administrator**** MINGW64 ~/gittemp (master)
$ touch Readme.txt
Administrator**** MINGW64 ~/gittemp (master)
$ git status
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
Readme.txt
nothing added to commit but untracked files present (use "git add" to track)
Administrator**** MINGW64 ~/gittemp (master)
$ git add Readme.txt
Administrator**** MINGW64 ~/gittemp (master)
$ git commit -m "Add readme.txt"
Administrator**** MINGW64 ~/gittemp (master)
$ git remote add origin https://github.com/****/projects.git
Administrator**** MINGW64 ~/gittemp (master)
$ git remote -v
origin https://github.com/****/projects.git (fetch)
origin https://github.com/****/projects.git (push)
Administrator**** MINGW64 ~/gittemp (master)
$ git remote show
origin
/**************************여기서부터 GitHub내 파일 삭제 완료******************************/
Administrator**** MINGW64 ~/gittemp (master)
$ git push -u origin master
To https://github.com/****/projects.git
! [rejected] master -> master (non-fast-forward)
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Administrator**** MINGW64 ~/gittemp (master)
$ git push origin +some_branch
error: src refspec some_branch does not match any.
Administrator**** MINGW64 ~/gittemp (master)
$ git push origin +master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (5/5), 479 bytes | 0 bytes/s, done.
Total 5 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), done.
To https://github.com/****/projects.git
+ 4ebba1a...b180f2e master -> master (forced update)