'프로그램 사용/Version Control'에 해당되는 글 134건

  1. 2018.08.14 git mv 와 log
  2. 2018.08.13 git mv
  3. 2018.04.24 우분투에서 GIT 사용방법 2
  4. 2017.12.20 svn 로그 수정 pre-revprop-change
  5. 2017.12.10 svn externals commit 제외하기
  6. 2017.11.03 svn externals 제약사항 (파일은 안됨)
  7. 2017.09.16 tortoiseSVN 엑셀 비교
  8. 2017.07.03 sorucetree / git client
  9. 2017.04.25 git 공부.. 2
  10. 2017.04.25 git-svn 관련글

git mv

를 이용하여 파일을 옮기면 원칙적으로는 지우고 새로 추가하는 것과 동일하다는데


사실 git mv 명령은 아래 명령어를 수행한 것과 완전 똑같다.


$ mv README.md README

$ git rm README.md

$ git add README 

[링크 : https://git-scm.com/book/ko/v2/Git의-기초-수정하고-저장소에-저장하기]


그렇다고 완전히 삭제하고 더하는것과는 조금 다르게 이어지긴 이어 지는 듯

단, 옵션을 통해서 콘솔에서 봐야 한다는 단점아닌 단점?

거북이 에서는 하단의 Show Whole Project를 하면 이전의 이동전 내역이 보이게 되고


콘솔에서는 --follow 옵션을 통해 이어서 볼 수 있다

(단, 특정 파일을 지정해야 한다)

$ git log --follow

fatal: --follow requires exactly one pathspec 


[링크 : https://stackoverflow.com/.../is-it-possible-to-move-rename-files-in-git-and-maintain-their-history]

  [링크 : https://stackoverflow.com/...git-log-not-show-history-for-a-moved-file-and-what-can-i-do-about-it]


'프로그램 사용 > Version Control' 카테고리의 다른 글

git st (alias 사용하기)  (0) 2018.08.14
git status -s  (0) 2018.08.14
git mv  (0) 2018.08.13
우분투에서 GIT 사용방법  (2) 2018.04.24
svn 로그 수정 pre-revprop-change  (0) 2017.12.20
Posted by 구차니

아직 익숙하지 않아서 그런데

git는 svn 에서 처럼 repo browser 등에서 편하게 옮기는 법이 없는 듯..

콘솔에서 다 명령어 칠거면 tortoiseGIT 이런게 필요 없자나.. ㅠㅠ


아무튼 파일을 옮기는건 git mv를 통해서 가능

빈 디렉토리는 옮길수 없고,

git 콘솔에서(git bash 등) git mv를 하고 나서

git commit을 하면 끝


그리고 정리가 끝난 이후에 끝난 녀석만 origin에 push 하면 된다.

[링크 : https://git-scm.com/docs/git-mv]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git status -s  (0) 2018.08.14
git mv 와 log  (0) 2018.08.14
우분투에서 GIT 사용방법  (2) 2018.04.24
svn 로그 수정 pre-revprop-change  (0) 2017.12.20
svn externals commit 제외하기  (0) 2017.12.10
Posted by 구차니

GIT 쓸 일이 없다 보니..

일단 리눅스에서 개발하면서 한번 써보면 파악이 되겠지 머..


$ apt-cache search git | grep ^git

git - fast, scalable, distributed revision control system

git-core - fast, scalable, distributed revision control system (obsolete) 

git-all - fast, scalable, distributed revision control system (all subpackages)


step 1. 패키지 설치(안되어 있다면)

$ sudo apt-get install git 


step 2. git 설정

$ git config --global user.name "이름"

$ git config --global user.email "이메일주소"

$ git config --global color.ui "auto" 


step 3. 설정 내용 확인

$ git config --list

user.name=이름

user.email=이메일주소

color.ui=auto

$ vi ~/.gitconfig

[user]

        name = 이름

        email = 이메일주소

[color]

        ui = auto 


step 4. 저장소 생성

$ mkdir git_repo

$ cd git_repo

~/src/git_repo$ git init
초기화: 빈 깃 저장소, 위치 /home/odroid/src/git_repo/.git/ 
$ ll
합계 12
drwxrwxr-x 3 odroid odroid 4096  4월 24 15:56 ./
drwxrwxr-x 5 odroid odroid 4096  4월 24 16:08 ../
drwxrwxr-x 7 odroid odroid 4096  4월 24 15:56 .git/
$ du -h
8.0K    ./.git/info
44K     ./.git/hooks
4.0K    ./.git/objects/info
4.0K    ./.git/objects/pack
12K     ./.git/objects
4.0K    ./.git/branches
4.0K    ./.git/refs/heads
4.0K    ./.git/refs/tags
12K     ./.git/refs
96K     ./.git
100K    .


step 5. 저장소 복제
$ mkdir test
$ cd test
$ git clone ~/src/git_repo/
'git_repo'에 복제합니다...
warning: 빈 저장소를 복제한 것처럼 보입니다.
완료. 


[링크 : http://devaom.com/?p=745]

[링크 : https://git-scm.com/book/ko/v2/Git-서버-프로토콜]



+

bare를 주면 .git 아래 생성될게 바로 생성되는건가?

$ git init --bare --shared

초기화: 빈 공유 깃 저장소, 위치 /home/odroid/src/tt/


$ ll

합계 40

drwxrwsr-x 7 odroid odroid 4096  4월 24 16:08 ./

drwxrwxr-x 5 odroid odroid 4096  4월 24 16:08 ../

-rw-rw-r-- 1 odroid odroid   23  4월 24 16:08 HEAD

drwxrwsr-x 2 odroid odroid 4096  4월 24 16:08 branches/

-rw-rw-r-- 1 odroid odroid  126  4월 24 16:08 config

-rw-rw-r-- 1 odroid odroid   73  4월 24 16:08 description

drwxrwsr-x 2 odroid odroid 4096  4월 24 16:08 hooks/

drwxrwsr-x 2 odroid odroid 4096  4월 24 16:08 info/

drwxrwsr-x 4 odroid odroid 4096  4월 24 16:08 objects/

drwxrwsr-x 4 odroid odroid 4096  4월 24 16:08 refs/


$ du -h

8.0K    ./info

44K     ./hooks

4.0K    ./objects/info

4.0K    ./objects/pack

12K     ./objects

4.0K    ./branches

4.0K    ./refs/heads

4.0K    ./refs/tags

12K     ./refs

96K     .


[링크 : https://git-scm.com/book/ko/v2/Git-서버-서버에-Git-설치하기]


+

shared가 정의되지 않으면 umask에 의해 나오는 결과로 생성하는 것으로 보인다.

근데.. shared만 설정하면 머가 되는진 모르겠네?

 

--shared[=(false|true|umask|group|all|world|everybody|0xxx)]

Specify that the Git repository is to be shared amongst several users. This allows users belonging to the same group to push into that repository. When specified, the config variable "core.sharedRepository" is set so that files and directories under $GIT_DIR are created with the requested permissions. When not specified, Git will use permissions reported by umask(2).

The option can have the following values, defaulting to group if no value is given:

umask (or false)

Use permissions reported by umask(2). The default, when --shared is not specified.

group (or true)

Make the repository group-writable, (and g+sx, since the git group may be not the primary group of all users). This is used to loosen the permissions of an otherwise safe umask(2) value. Note that the umask still applies to the other permission bits (e.g. if umask is 0022, using group will not remove read privileges from other (non-group) users). See 0xxx for how to exactly specify the repository permissions.

all (or world or everybody)

Same as group, but make the repository readable by all users.

0xxx

0xxx is an octal number and each file will have mode 0xxx0xxx will override users' umask(2) value (and not only loosen permissions as group and all does). 0640 will create a repository which is group-readable, but not group-writable or accessible to others. 0660 will create a repo that is readable and writable to the current user and group, but inaccessible to others.

By default, the configuration flag receive.denyNonFastForwards is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it.

If you provide a directory, the command is run inside it. If this directory does not exist, it will be created.


[링크 : https://git-scm.com/docs/git-init#git-init---sharedfalsetrueumaskgroupallworldeverybody0xxx]


위에 기록을 보니..

SGID를 통해서 접근 통제를 하도록(그룹권한을 따름) rws로 설정된다.



+

git 혼자사용으로 검색

[링크 : http://www.internetmap.kr/entry/Simple-Guide-for-Git]


+

2018.04.26

git 콘솔 명령어 목록 모음

[링크 : https://github.com/jeonghwan-kim/git-usage]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git mv 와 log  (0) 2018.08.14
git mv  (0) 2018.08.13
svn 로그 수정 pre-revprop-change  (0) 2017.12.20
svn externals commit 제외하기  (0) 2017.12.10
svn externals 제약사항 (파일은 안됨)  (0) 2017.11.03
Posted by 구차니

svn 에서 로그를 수정하는 방법인데.

이걸 허용하면, 로그가 수정되는것에 대한 로그는 안남으니

로그에 대한 신뢰성이 떨어질수도 있게 되니 주의해서 써야 할 듯..


아무튼 그냥 사용하려고 해보니까

show log에서 edit log message

창이뜨는데 수정대충하거나 그냥 OK 눌러보면

요런 에러가 뜬다.


원인이야.. 기존에 사용하던 저장소가 기본설정이라

해당 파일이 없기 때문이고

해당 저장소의 hooks 아래로 들어가서 단순하게 아래 한줄 실행하면 해결되긴 하는데..

수정이 가능하다는건 로그에 대한 신뢰가 떨어진다는 문제니까 고민이 되네..

허용을 해야 하나 말아야 하나....

$ sudo cp pre-revprop-change.tmpl pre-revprop-change


hooks$ cat pre-revprop-change.tmpl

#!/bin/sh


# PRE-REVPROP-CHANGE HOOK

#

# The pre-revprop-change hook is invoked before a revision property

# is added, modified or deleted.  Subversion runs this hook by invoking

# a program (script, executable, binary, etc.) named 'pre-revprop-change'

# (for which this file is a template), with the following ordered

# arguments:

#

#   [1] REPOS-PATH   (the path to this repository)

#   [2] REVISION     (the revision being tweaked)

#   [3] USER         (the username of the person tweaking the property)

#   [4] PROPNAME     (the property being set on the revision)

#   [5] ACTION       (the property is being 'A'dded, 'M'odified, or 'D'eleted)

#

#   [STDIN] PROPVAL  ** the new property value is passed via STDIN.

#

# If the hook program exits with success, the propchange happens; but

# if it exits with failure (non-zero), the propchange doesn't happen.

# The hook program can use the 'svnlook' utility to examine the

# existing value of the revision property.

#

# WARNING: unlike other hooks, this hook MUST exist for revision

# properties to be changed.  If the hook does not exist, Subversion

# will behave as if the hook were present, but failed.  The reason

# for this is that revision properties are UNVERSIONED, meaning that

# a successful propchange is destructive;  the old value is gone

# forever.  We recommend the hook back up the old value somewhere.

#

# On a Unix system, the normal procedure is to have 'pre-revprop-change'

# invoke other programs to do the real work, though it may do the

# work itself too.

#

# Note that 'pre-revprop-change' must be executable by the user(s) who will

# invoke it (typically the user httpd runs as), and that user must

# have filesystem-level permission to access the repository.

#

# On a Windows system, you should name the hook program

# 'pre-revprop-change.bat' or 'pre-revprop-change.exe',

# but the basic idea is the same.

#

# The hook program typically does not inherit the environment of

# its parent process.  For example, a common problem is for the

# PATH environment variable to not be set to its usual value, so

# that subprograms fail to launch unless invoked via absolute path.

# If you're having unexpected problems with a hook program, the

# culprit may be unusual (or missing) environment variables.

#

# Here is an example hook script, for a Unix /bin/sh interpreter.

# For more examples and pre-written hooks, see those in

# /usr/share/subversion/hook-scripts, and in the repository at

# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and

# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/



REPOS="$1"

REV="$2"

USER="$3"

PROPNAME="$4"

ACTION="$5"


if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi


echo "Changing revision properties other than svn:log is prohibited" >&2

exit 1 


[링크 : http://junho85.pe.kr/48]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git mv  (0) 2018.08.13
우분투에서 GIT 사용방법  (2) 2018.04.24
svn externals commit 제외하기  (0) 2017.12.10
svn externals 제약사항 (파일은 안됨)  (0) 2017.11.03
tortoiseSVN 엑셀 비교  (0) 2017.09.16
Posted by 구차니

음.. 클라이언트에 의존적인 문제면.. 꼬부기로는 어쩔수가 없다는 건가?

Show externals from different repositories는 무조건 체크인데..

동일 저장소라 안꺼지는건가?


[링크 : https://stackoverflow.com/questions/13933305/svn-ignore-externals-when-committing]


svn:ignore 설정하면 될 줄 알았으나 똑같네.. 방법 없나?

[링크 : https://mytory.net/archives/1015]

Posted by 구차니

실험을 해보니..

동일 서버의 다른 저장소에서 끌어올 수 있으나

엑셀 파일을 직접적으로 끌어갈 순 없고

그 파일이 존재하는 상위 폴더를 끌어갈 수는 있다.



[링크 : https://stackoverflow.com/questions/12885661/single-image-file-to-be-svn-externals]

[링크 : https://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-externals.html]


2014/12/29 - [프로그램 사용/CVS & SVN & GIT & Mercurial] - svn externals 를 이용한 외부 프로젝트 자동으로 불러오기(?)


'프로그램 사용 > Version Control' 카테고리의 다른 글

svn 로그 수정 pre-revprop-change  (0) 2017.12.20
svn externals commit 제외하기  (0) 2017.12.10
tortoiseSVN 엑셀 비교  (0) 2017.09.16
sorucetree / git client  (0) 2017.07.03
git 공부..  (2) 2017.04.25
Posted by 구차니

파일을 오픈해서는 안될거 같고

아무튼.. 워드2007에서는 비교 기능이 있으나 엑셀2007에서는 비교 기능이 없어서

별도의 스크립트를 통해 비교해주도록 tortoiseSVN에서 구현 한 듯.

[링크 : https://support.office.com/en-us/article/Compare-document-differences-using-the-legal-blackline-option-dbfc7351-4022-43a2-a0c4-54d1898702a0?ui=en-US&rs=en-US&ad=US]



'프로그램 사용 > Version Control' 카테고리의 다른 글

svn externals commit 제외하기  (0) 2017.12.10
svn externals 제약사항 (파일은 안됨)  (0) 2017.11.03
sorucetree / git client  (0) 2017.07.03
git 공부..  (2) 2017.04.25
git-svn 관련글  (0) 2017.04.25
Posted by 구차니

거북이는 느려서 안썼는데

얘는 빠르다는 제보가 있으니 한번 테스트 삼아 써봐야지


[링크 : https://www.sourcetreeapp.com/]

'프로그램 사용 > Version Control' 카테고리의 다른 글

svn externals 제약사항 (파일은 안됨)  (0) 2017.11.03
tortoiseSVN 엑셀 비교  (0) 2017.09.16
git 공부..  (2) 2017.04.25
git-svn 관련글  (0) 2017.04.25
svn list 예제  (0) 2017.02.03
Posted by 구차니

후배를 갈아먹자 -_-


[링크 : https://git-scm.com/book/en/v2]

[링크 : https://git-scm.com/book/ko/v2]


git fetch(서버에서 받아오기)

git merge(병합)

>> git pull


git checkout (브랜치 선택)


git commit 로컬 저장소 저장

git push 원격 저장소 저장


git clone


git init (로컬 저장소 생성)

git remote add repo (로컬 저장소와 원격저장소 연결)

git pull (원격 저장소의 정보를 내려받음)

>> git clone repo (로컬 저장소와 원격저장소 동일) 

[링크 : https://www.slideshare.net/einsub/svn-git-17386752]

'프로그램 사용 > Version Control' 카테고리의 다른 글

tortoiseSVN 엑셀 비교  (0) 2017.09.16
sorucetree / git client  (0) 2017.07.03
git-svn 관련글  (0) 2017.04.25
svn list 예제  (0) 2017.02.03
svn hook encv  (0) 2016.12.30
Posted by 구차니

dcommit이라는걸 이제야 발견해서 검색..

음... 나중에 한번 써먹어볼까?


$ git svn dcommit

[링크 : http://www.allofsoftware.net/2011/08/blog-post.html]

[링크 : https://git-scm.com/book/ko/v1/Git으로-이전하기-Git과-Subversion]


2011/12/23 - [프로그램 사용/CVS & SVN & GIT & Mercurial] - git-svn

'프로그램 사용 > Version Control' 카테고리의 다른 글

sorucetree / git client  (0) 2017.07.03
git 공부..  (2) 2017.04.25
svn list 예제  (0) 2017.02.03
svn hook encv  (0) 2016.12.30
svn commit email - python / synology  (0) 2016.12.30
Posted by 구차니