글
git 명령어 정리
* 로컬 branch 삭제
$git branch -d feature/branchName
* 원격 브랜치 삭제
$git push origin --delete feature/branchName
* 동시 삭제 (문법으로 제공하지 않아서 bash에서 꼼수로ㅋ)
$ git branch --list "feature*" | xargs git branch -d
옆으로 죽 쓰면되긴된다.
$ git branch -d A B C D
* 수정해버려서.. 브랜치를 새로 생성하고 싶을때
분기할 branch로 이동 후
$git checkout development
생성
$git checkout -b feature/branchName
'Programming' 카테고리의 다른 글
| Git diff ^M (0) | 2017.11.08 |
|---|---|
| Windows 10 Bash 쉘에서 git http접속시 암호재입력 하지않게 하기 (0) | 2017.11.08 |
| apt-get 명령어정리 (0) | 2017.11.06 |
| mysql dateformat (0) | 2017.07.11 |
| window 에서 괄호가 포함된 파일명 검색 (0) | 2015.07.22 |
글
Git diff ^M
windows 10 에서 intellij로 commit후 push 했는데
bash에서 git status로 확인해보면 잔뜩 commit되지 않았다고 목록이 출력된다.
git diff로 바뀐게 뭔가 확인해보면 line break문자열인지 ^M들이 잔뜩 들어가있다.
git의 옵션 중에 자동으로 Linux용 개행문자로 변환하는 옵션이 있다고한다.
$ git config --global core.autocrlf input
'Programming' 카테고리의 다른 글
| git 명령어 정리 (0) | 2017.11.30 |
|---|---|
| Windows 10 Bash 쉘에서 git http접속시 암호재입력 하지않게 하기 (0) | 2017.11.08 |
| apt-get 명령어정리 (0) | 2017.11.06 |
| mysql dateformat (0) | 2017.07.11 |
| window 에서 괄호가 포함된 파일명 검색 (0) | 2015.07.22 |
글
Windows 10 Bash 쉘에서 git http접속시 암호재입력 하지않게 하기
ssh로 접속 시 ssh agent가 계속 꺼져서 불편해서 다시 http접속으로 변경 후 credential manager를 이용하는 방법을 찾기 시작
windows 에 내장된 자격증명 관리자를 쓰면되는데.. bash쉘에서는 접근이 안되는듯 하다(내가 못하는 걸지도)
- 기존 credential이 있으면 확인 삭제
$ git config --global --list
$ git config --global --unset credential.helper wincred
- 자바설치(Jre or JDK)
$ sudo apt-get install default-jdk
(https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get)
- Linux용 Git Credential Manager 설치
( https://github.com/Microsoft/Git-Credential-Manager-for-Mac-and-Linux )
$ java -jar /home/example/git-credential-manager/git-credential-manager-2.0.3.jar install
- 설치가 잘되었는지 확인
$ git config --global --get credential.helper git-credential-manager
- git pull을 두번 해보고.. 두번째부터 묻지않으면 성공!
'Programming' 카테고리의 다른 글
| git 명령어 정리 (0) | 2017.11.30 |
|---|---|
| Git diff ^M (0) | 2017.11.08 |
| apt-get 명령어정리 (0) | 2017.11.06 |
| mysql dateformat (0) | 2017.07.11 |
| window 에서 괄호가 포함된 파일명 검색 (0) | 2015.07.22 |