블로그 이미지
윤영식
Full Stacker, Application Architecter, KnowHow Dispenser and Bike Rider

Publication

Category

Recent Post

2012. 12. 21. 09:29 Lean Agile Culture

웹서핑을 하다가 user-agent의 역사에 대한 글을 읽었다. 모자익->넷스케이프->IE->사파리/오페라->크롬에 오기까지 서로 엔진은 유사하면서 이름은 틀린 브라우져의 전쟁사이다. 결국 내부적인 엔진은 유사한데 이름만 틀리다는 이야기이다. 뿌리깊은 나무~


* 참고 : user-agent의 역사



크롬에서 user-agent를 보려면 다음 순서로 확인함

  • F12 펑션키 클릭
  • network 탭 -> 서브 Headers 탭 이동 
  • 임의 url 브라우징 요청
  • Headers 탭안에 user-agent 값 확인

user-agent:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11


posted by 윤영식
2012. 12. 20. 16:42 Git, GitHub/Git Lec01

git은 브랜치로 코드를 다룬다. 릴리즈 브랜치는 릴리즈할 코드를 분리할 목적에서 사용한다.


  • 구현하기로 한 기능 구현이 끝나면 릴리즈할 코드를 분리할 목적으로 브랜치를 생성한다. (완전히 검토된 상태는 아님)
  • 최소한의 변경은 발생하며, 버그나 로직 수정에만 집중한다 (기능추가 없음)
  • 이름은 RB_ 로 접두어를 붙이면 좋다
  • 릴리즈 브랜치는 마지막 테스트까지만 존재한다
  • 릴리즈 준비가 끝나면 태그(Tag)를 붙이고 해당 브랜치를 삭제한다 
  • 해당 릴리즈의 수정은 태그에서 브랜칭하여 수정 처리한다 

// 현재 태그 
$ git tag
1.0

// 태그에서 새로운 릴리즈 브랜치 만들기 (특정 브랜치에서 수정을 하고자 할 때)
$ git branch RB_1.0.1 1.0

// 브랜치 이동
$ git checkout RB_1.0.1
Switched to branch 'RB_1.0.1'

// 현재 브랜치 명
$ git branch
* RB_1.0.1
  another-from-1.0
  from-1.0
  master

// RB_1.0.1 수정이 완료되면 RB_1.0.1 에 대한 tag 1.0.1 을 만듦 
$ git tag 1.0.1

// 태그 목록 보기 
$ git tag
1.0
1.0.1

// 생성했던 브랜치는 삭제하고 태그 1.0.1 만 남김 
$ git checkout master
Switched to branch 'master'

$ git branch -D RB_1.0.1
Deleted branch RB_1.0.1 (was f5844d4).

$ git branch
  another-from-1.0
  from-1.0
* master


* 참조 : Git 선화

posted by 윤영식
2012. 12. 20. 16:01 Git, GitHub/Git Lec01

Git의 tag는 코드의 책깔피와 같아서 릴리즈된 코드에 tag를 달아두면 언제나 해당 태그로 이동할 수 있다. 즉, Freezing Code Release 정도로 보면 되겠다. Tag 는 브랜치처럼 다루어 지지만 읽기만 가능하다. 따라서 변경을 하고 태그로 부터 별도 브랜치를 생성하여 진행하면 된다. 


// 현재 상태 

$ git branch

* master


// 태그 생성

$ git tag 1.0


// 태그 목록 

$ git tag

1.0


// 태그로 이동 : 태그로 이동하면 마치 주인없는 땅으로 이동한 것과 같다 

$ git checkout 1.0

Note: checking out '1.0'.


You are in 'detached HEAD' state. You can look around, make experimental

changes and commit them, and you can discard any commits you make in this

state without impacting any branches by performing another checkout.


If you want to create a new branch to retain commits you create, you may

do so (now or later) by using -b with the checkout command again. Example:


  git checkout -b new_branch_name


HEAD is now at f5844d4... add license.properties


// no branch라고 나온다 

$ git branch

* (no branch)

  master


// 태그에서 별도의 브랜치를 생성하여 write 작업을 할 수 있다 

$ git checkout -b from-1.0

Switched to a new branch 'from-1.0'


// 전체 브랜치 목록

$ git branch

* from-1.0

  master


// 태그 1.0 에서 또 다른 브랜치 생성

$ git checkout -b another-from-1.0 1.0

Switched to a new branch 'another-from-1.0'


// 전체 브랜치 목록

$ git branch

* another-from-1.0

  from-1.0

  master


릴리즈 버전에 대하여 코드 freezing 시에 사용하자 

posted by 윤영식
2012. 12. 17. 11:33 Lean Agile Culture
기존 산업에서 모바일로 이동하기 위한 또는 융합하기 위해 인지하고 있어야 할 5가지 패러다임에 대하여 잘 요약했다. Web 3.0 소셜 시대에 대비하고 기존 로컬 솔루션을 서비스화 하기위해 알아야 할것은 무엇이 있을까?  예로 든다면 GitHub처럼 Git 원격 저장소를 서비스형태로 만들었고, APM 업체인 New Relic은 APM 서버를 Cloud 기반 SaaS 로 바꾸었다. 국내에서는 ERP업체가 Cloud 기반 SaaS를 준비하고 있다. 기존 솔루션을 서비스화하고 모바일을 지향하기 위한 우리의 패러다임 변화는 무엇일까?



posted by 윤영식
2012. 12. 17. 11:12 Git, GitHub/Git Lec01

Git은 분산 버전 관리 시스템이므로 원격의 공유 저장소가 있다. Private 하게 원격 저장소를 구축할 수도 있고, 요즘은 GitHub을 SaaS 형태로 사용하면 된다. GitHub에선 Public과 Private이 있는데, Public 은 공짜, Private은 subscription 모델로 월단위로 과금을 한다. 



▶ remote 저장소 주소들 (GitHub기준)

  • SSH (Secure Shell) : git@github.com:<아이디>/<프로젝트>.git   (주로 write 권한을 주고자 할 때 사용 - push)
    예) git@github.com:ysyun/jmqtt_client.git
  • GIT 프로토콜 :  git://github.com/<아이디>/<프로젝트>.git  (주로 read 권한을 주고자 할 때 사용. 9418포트 사용 - pull)
    예) git://github.com/ysyun/jmqtt_client.git
  • HTTP, HTTPS : https://github.com/<아이디>/<프로젝트>.git  (속도 제일 느리지만 방화벽 오픈 필요없음)
    예) https://github.com/ysyun/jmqtt_client.git



▶ remote 저장소에 대한 별칭 관리

  • git remote add <별칭> <원격지 주소> : 예) git remote add origin https://github.com/ysyun/jmqtt_client.git
  • origin : 원격 저장소를 가르키는 일반적인 별칭으로 사용한다. 
  • git remote -v : 별칭한 내역을 볼 수 있다
  • git branch -r : 별칭에 대한 remote repository의 branch를 볼 수 있다 
  • git remote rm <별칭> : 별칭을 제거한다 
$ git clone https://github.com/ysyun/jmqtt_client.git
Cloning into 'jmqtt_client'...
remote: Counting objects: 195, done.
remote: Compressing objects: 100% (140/140), done.
Rremote: Total 195 (delta 54), reused 161 (delta 32)eceiving objects:  65% (127/
Receiving object
Receiving objects: 100% (195/195), 238.32 KiB | 184 KiB/s, done.
Resolving deltas: 100% (54/54), done.

$ cd jmqtt_client/

$ git branch
* master

$ git branch -r
  origin/HEAD -> origin/master
  origin/master

$ git remote -v
origin  https://github.com/ysyun/jmqtt_client.git (fetch)
origin  https://github.com/ysyun/jmqtt_client.git (push)



▶ remote 저장소 Pulling 
  • github의 경우는 머전 github에서 프로젝트의 remote repository를 생성한다
  • git clone <remote address>를 통하여 local PC의 local repository로 복제를 한다 (위 예제 참조)
  • git fetch <remote> <refspec> : 지역 저장소의 원격 브랜치가 갱신됨 (지역 브랜치에 변경사항을 합치진 않음)
  • git pull : default origin 원격 저장소에서 현재 브랜치로 merge 함 
  • git pull <remote> <refspec> : 원격 장소에서 가져온 소스를 현재 지역 브랜치에 merge 함
  • <remote> : 원격 저장소의 별칭 origin을 입력하면 된다. 별칭이 없다면 전체 주소를 넣어야 한다.
$ git pull
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From https://github.com/ysyun/jmqtt_client
   e13af6f..bf80359  master     -> origin/master
Updating e13af6f..bf80359
Fast-forward
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)




▶ remote 저장소 Pushing

  • git push : default origin 저장소를 & 현재 브랜치를 원격의 같은 브랜치로 푸싱한다 
  • git push <remote> <branch> :현재 브랜치를 원격의 신규 또는 존재하는 branch로 푸싱한다
  • git push <remote> <branch1>:<branch2> : 지역 branch1을 원격의 신규 또는 존해하는 branch2로 푸싱한다 
  • git push --dry-run <매개변수>: 푸싱된 변경 사항을 확인
  • <remote> : 원격 저장소의 별칭 origin을 입력하면 된다. 별칭이 없다면 전체 주소를 넣어야 한다.
yuwonsystem01@YSYUN91005152 /d/git-repositories/jmqtt_client (master)
$ touch license.properties
$ vi license.properties

// 파일하나 로컬 저장소에 추가하기
$ git add license.properties
$ git commit -a -m "add license.properties"
[master f5844d4] add license.properties
 1 file changed, 1 insertion(+)
 create mode 100644 license.properties

// 원격 origin 서버로 현재 master 브랜치내용 push 하기 (id & pwd 물어봄)
$ git push origin master  (또는 git push)
Username for 'https://github.com': ysyun@yuwin.co.kr
Password for 'https://ysyun@yuwin.co.kr@github.com':
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 297 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
To https://github.com/ysyun/jmqtt_client.git
   bf80359..f5844d4  master -> master


* 참조 : 선화의 Git

'Git, GitHub > Git Lec01' 카테고리의 다른 글

[Git] Release 브랜치 다루기  (0) 2012.12.20
[Git] tag 다루기  (0) 2012.12.20
[Git] History 이용 및 관리하기  (0) 2012.12.13
[Git] Merge 종류와 충돌 해결하기  (0) 2012.12.12
[Git] Reset 사용하기  (0) 2012.12.11
posted by 윤영식