• This will unstage all files you might have staged with git add:
  • git reset
  • This will revert all local uncommitted changes (should be executed in repo root):You can also revert uncommitted changes only to particular file or directory:Yet another way to revert all uncommitted changes (longer to type, but works from any subdirectory):
  • git reset --hard HEAD
  • git checkout [some_dir|file.txt]
  • git checkout .
  • This will remove all local untracked files, so only git tracked files remain:WARNING: -x will also remove all ignored files, including ones specified by .gitignore! You may want to use -n for preview of files to be deleted.
  • git clean -fdx

To sum it up: executing commands below is basically equivalent to fresh git clone from original source (but it does not re-download anything, so is much faster):

git reset
git checkout .
git clean -fdx

Typical usage for this would be in build scripts, when you must make sure that your tree is absolutely clean - does not have any modifications or locally created object files or build artefacts, and you want to make it work very fast and to not re-clone whole repository every single time.

 

 

https://stackoverflow.com/questions/14075581/git-undo-all-uncommitted-or-unsaved-changes

 

git undo all uncommitted or unsaved changes

I'm trying to undo all changes since my last commit. I tried git reset --hard and git reset --hard HEAD after viewing this post. I responds with head is now at 18c3773... but when I look at my local

stackoverflow.com

 

 

 

 

 

이전 커밋 상태로 돌아가는게 아니라 그냥 관리하지않는 내역을 전부 삭제해버리는거였다.

결국 그냥 폴더 지우고 깃에서 다시 다운로드 받고 새롭게 라이브러리 설치.

일단 이슈는 생성자가 삭제할 수 있는게 아니라 해당 레포지토리 생성자만 삭제할 수 있다.

 

;;;;

 

 

공동작업자로 들어간 레포지토리에 고쳐야할 버그들 메모장용으로 쓸까하다가 생성했더니 삭제가 안되서 그 경험으로 남겨보는 글이다.

 

 

 

우선 삭제 하고자하는 이슈페이지에 들어간다.

그리고 오른쪽 하단의 메뉴란을 살펴보면

 

Delete issue 라는 메뉴가 보인다.

 

상단에서 말했듯이 레포지토리 생성자만 있는 메뉴다

 

공동작업자는 해당 메뉴가 없다라고..... 망했어

 

그리고 해당 메뉴를 선택하면 아래 사진과 같은 경고창이 뜬다.

 

delete this issue 를 눌러주면 깔끔하게 이슈가 날라간다.

+ Recent posts