기본 콘텐츠로 건너뛰기

1월, 2013의 게시물 표시

[git] fork 해온 저장소를 최신 상태로 유지하기

Go 관련 번역 작업을 할 일이 있어서 했던 일들을 기록해둔다. 이슈에 내가 할 작업 분량을 공지하고 (다른 사람이 두번 삽질 안하게) 바로 fork 해서 내 저장소로 옮겨놓고 수정하고 pull request 까지 끝낸 뒤 원본에서 merge까지 끝났다. 그 다음은? 내가 fork 한 저장소의 작업과 별개로 원본의 작업은 진행되고 있고 아마 내 저장소의 것들은 상대적으로 구버전일 것이다. 원본에서 pull로 땡겨와서 merge 하기 위해 remote 를 먼저 등록해두자. $ git remote add upstream git@github.com:golanger/go-tour-translator.git 확인해본다. $ git remote origin upstream origin 과 새로 추가한 upstream. 두개를 확인할 수 있다. 그러면 upstream으로부터 pull 해보자. $ git pull upstream From github.com:golanger/go-tour-translator  * [new branch]      master     -> upstream/master You asked to pull from the remote 'upstream', but did not specify a branch. Because this is not the default configured remote for your current branch, you must specify a branch on the command line. 그냥 pull 하니까 오류를 뱉는다. 어떤 브랜치인지 지정 안했다는 얘기지뭐. 디폴트로 master를 해줬으면 좋겠지만 확실한게 좋다. upstream에서 master를 가져오도록 해보자. $ git pull upstream master From github.com:golanger/go-tour-translator  * branch          

go를 사용하여 Google App Engine에 정적 웹서버를 올려보자.

작년에 미뤄뒀던 Go 를 다시 보고 있다. 동기부여를 위해 회사 안내 홈페이지를 망할 일도 없고 비용이 안드는 곳으로 옮기고 싶은 생각이 있었는데 Google App Engine (이하 GAE)정도면 뭐 망할 일이 없겠지 싶다. Google Apps 처럼 유료화해도 먼저 만들어 놓은 서비스/계정은 안건드니까 먼저 침이라도 발라놓아야지. 개발환경 세팅은 간단했다. Download 에서 package 를 받고 설치한 다음 goide를 쓰고 싶었으나 아직 완성도 문제가 있어서 sublime을 사용하기로 결정. http://wbond.net/sublime_packages/package_control/installation 는 전에 설치해놓았다. 그저 sublime을 띄운 상태에서 ctrl+` (OS X에서도 ctrl+` 임)을 누르면 나타나는 하단 콘솔창에 import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation' 요 내용을 붙여넣으면 끝. 그 다음 sublime용 golang plugin인 GoSublime 을 추가 데모 동영상을 보면서 사용법을 간단하게 알아보면 0:11즈음에 나오는 package 삽입 기능은