Passion 450

git push origin HEAD

그냥 git push를 하면 에러가 날 때가 있다. 어느 브랜치에 푸시해야 할지 모르는 경우일 때 발생한다. 이 때 설정 값은 git-config 문서에 따르면 push.default로 설정할 수 있는 옵션에는 여러 가지가 있습니다. nothing : 명시적으로 어디로 보낼 지를 다 작성해야 합니다. (그냥 쓰면 푸쉬하지 않습니다.) current : 원격 저장소에 같은 이름의 branch에 push합니다. upstream : 현재 작업중인 branch를 지정해둔 원격 저장소의 branch로 push 합니다. simple : 현재 작업중인 branch와 원격 저장소의 branch명이 같을 때만 push합니다. (기본 설정) matching : 로컬과 원격 저장소의 브랜치명이 같은 모든 branch를 pu..

Passion/Programming 2024.03.21

tmux in rc.local

rc.local 을 활용하여 시작 스크립트를 실행할 수 있다. 그 중에서 tmux session을 열고 명령어를 실행하는 방법 /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. /root/start_kube.sh exit 0 /root/start_kube.sh 스크립트 #!/bin/sh # starting new tmux session with name 'kube' including one window called '..

Passion/bash 2020.03.02