티스토리 툴바


git usage

ICT/Little Tips 2011/07/25 14:49
a. 땡겨오기. (vdi 라는 git폴더를 땡겨옴)

$git clone git://server.name/where/vdi

Cloning into vdi...

remote: Counting objects: 6, done.

remote: Compressing objects: 100% (3/3), done.

remote: Total 6 (delta 0), reused 0 (delta 0)

Receiving objects: 100% (6/6), done. 


b. Branch 땡겨오기 (user_joonhyun 이라는 branch를 땡겨옴)

$git pull origin user_joonhyun
 From git://server.name/vdi

 * branch            user_joonhyun -> FETCH_HEAD

Updating 767e171..b93419b

Fast-forward

 joonhyun_test |    1 +

 1 files changed, 1 insertions(+), 0 deletions(-)

 create mode 100644 joonhyun_test


c. branch 변경 / 파일 변경 / 추가 하기

$git checkout user_joonhyun

Branch user_joonhyun set up to track remote branch user_joonhyun from origin.

Switched to a new branch 'user_joonhyun'
$git branch
   master

* user_joonhyun
$touch test_add
$git add test_add
$git commit -a -m "나님이 파일 한개를 추가하였음ㅋ" 

[user_joonhyun 6ed1992] 나님이 파일 한개를 추가하였음ㅋ

 1 files changed, 1 insertions(+), 0 deletions(-)

 create mode 100644 second_test 


d. git 서버로 올리기

$git push origin user_joonhyun

Counting objects: 4, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (2/2), done.

Writing objects: 100% (3/3), 349 bytes, done.

Total 3 (delta 0), reused 0 (delta 0)

To git://10.12.18.208/vdi

   b93419b..6ed1992  user_joonhyun -> user_joonhyun 


e. Git Server 에서 branch 관리 및 merge 하기. 

$git checkout user_joonhyun (하면 user_joonhyun 이 추가한 파일을 볼 수 있다)
$git show (올린 사람의 comment 와 변경사항을 볼 수 있다)

commit 6ed19927e025f037450e5a22082c627e02911e27

Author: joonhyun.pac <shibaboy@gmail.com>

Date:   Mon Jul 25 14:30:09 2011 +0900


    나님이 파일 한개를 추가하였음ㅋ


diff --git a/second_test b/second_test

new file mode 100644

index 0000000..c7476c8

--- /dev/null

+++ b/second_test

@@ -0,0 +1 @@

+user_joonhyun branch second test

$git merge user_joonhyun (요걸로 user_joonhyun branch를 merge함)

Updating 767e171..6ed1992

Fast-forward

 joonhyun_test |    1 +

 second_test   |    1 +

 2 files changed, 2 insertions(+), 0 deletions(-)

 create mode 100644 joonhyun_test

 create mode 100644 second_test 

* 마스터에서 merge를 해주면 당연히 앞으로 git clone을 할 시 user_joonhyun의 branch에 변경/추가된 사항이 받아짐. 





저작자 표시 비영리 변경 금지
Posted by shibaboy

댓글을 달아 주세요

mysql -e 'show databases;'

+--------------------+

| Database           |

+--------------------+

| information_schema | 

| bitnami_redmine    | 

| mysql              | 

| test               | 

+--------------------+

 
mysql -N -e 'show databases;'

+--------------------+

| information_schema | 

|    bitnami_redmine | 

|              mysql | 

|               test | 

+--------------------+

 
mysql -N -B -e 'show databases;' 

information_schema

bitnami_redmine

mysql

test

 
Check the differences when plus some options. This would be useful for making scripts.
저작자 표시 비영리 변경 금지
Posted by shibaboy
TAG bash, mysql, SCRIPT

댓글을 달아 주세요

solaris reboot

ICT/Nexenta 2011/05/10 20:05
solaris OS reboot command. 

shutdown -y -i6 -g0


저작자 표시 비영리 변경 금지
Posted by shibaboy

댓글을 달아 주세요