2019.09.26 GIT
기본설정
admin@7-21 MINGW64 ~
$ git config --global user.name "kim tae young"
admin@7-21 MINGW64 ~
$ git config --global user.email "kty6307@naver.com"
mkdir, 저장소 생성 : git init, 깃상태확인 : git status
admin@7-21 MINGW64 ~
$ mkdir d:/project /*project폴더생성*/
admin@7-21 MINGW64 ~
$ cd d:/project /*이동*/
admin@7-21 MINGW64 /d/project
$ git init /*저장소 생성하기, 현재 위치한 project폴더에 .git폴더가 생성된다*/
Initialized empty Git repository in D:/project/.git/
admin@7-21 MINGW64 /d/project (master)
$ git status /*git 상태확인*/
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)
변경된 파일 인덱스에 등록 : git add 파일명
커밋 : git commit [옵션] 파일명
[ -m ] "메세지 입력란" : 메세지출력
[ -a ] : 커밋과 add를 동시에 하기
[ --amend ] : 이전커밋(내용or메시지)수정
admin@7-21 MINGW64 /d/project (master)
$ git add Hello.java /*git add 파일명*/
admin@7-21 MINGW64 /d/project (master)
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: Hello.java /*index에 새로운파일이 추가됨*/
admin@7-21 MINGW64 /d/project (master)
$ git commit Hello.java /* git commit 파일명 >> commit메세지출력*/
[master (root-commit) 784a5d2] Hello.java add
1 file changed, 3 insertions(+)
create mode 100644 Hello.java
admin@7-21 MINGW64 /d/project (master)
$ git commit -a -m "이름추가"
[master e7371a4] 이름추가
1 file changed, 2 insertions(+), 1 deletion(-)
admin@7-21 MINGW64 /d/project (master)
$ git commit --amend
[master cb054dc] sysout 출력추가
Date: Fri Sep 27 15:19:48 2019 +0900
1 file changed, 7 insertions(+), 1 deletion(-)
내용변경(메인메소드 추가)
로그기록확인 : git log [-숫자] : [-숫자]개의 로그출력
[-graph] : 로그기록을 그래프형태로 출력
[--oneline] : 내용을 한줄로 출력
[--decorate] : tag가 많은 경우 정리
admin@7-21 MINGW64 /d/project (master)
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: Hello.java /*파일이 변경됨*/
no changes added to commit (use "git add" and/or "git commit -a")
admin@7-21 MINGW64 /d/project (master)
$ git add Hello.java /*인덱스에 변경된 파일등록*/
admin@7-21 MINGW64 /d/project (master)
$ git commit -m "main method add" /*변경된 파일커밋*/
[master 47f5bdd] main method add
1 file changed, 2 insertions(+), 1 deletion(-)
admin@7-21 MINGW64 /d/project (master)
$ git status
On branch master
nothing to commit, working tree clean //더이상 할일이 없을 경우 뜨는 메세지
admin@7-21 MINGW64 /d/project (master)
$ git log //현재까지 로그기록확인
commit 47f5bdd69c4b833fb6296b8faaddba03032b51a1 (HEAD -> master)
Author: kim tae young <kty6307@naver.com>
Date: Thu Sep 26 17:18:51 2019 +0900
main method add
commit 784a5d26095e6021c47609a07f0befd0c4e7b745
Author: kim tae young <kty6307@naver.com>
Date: Thu Sep 26 17:12:40 2019 +0900
Hello.java add
admin@7-21 MINGW64 /d/project (master)
$ git log --graph
* commit b65162c7b55e5e02da86dc23fa4d7dab0ccf798b (HEAD -> master)
| Author: kim tae young <kty6307@naver.com>
| Date: Fri Sep 27 14:10:01 2019 +0900
|
| Hello와 index 수정
|
* commit e7371a47173492e4225518b4459eef6fce66fb95
| Author: kim tae young <kty6307@naver.com>
| Date: Fri Sep 27 14:03:32 2019 +0900
|
| 이름추가
|
* commit 9f0b55aab52e57aba66b852a02b66b4f27d3125f
| Author: kim tae young <kty6307@naver.com>
| Date: Fri Sep 27 14:01:36 2019 +0900
|
| index.txt
|
* commit 77db84c8937c92bce452cb8e1480d6628622d40d
| Author: kim tae young <kty6307@naver.com>
| Date: Fri Sep 27 13:57:06 2019 +0900
|
| print문 추가
|
* commit 47f5bdd69c4b833fb6296b8faaddba03032b51a1
| Author: kim tae young <kty6307@naver.com>
| Date: Thu Sep 26 17:18:51 2019 +0900
|
| main method add
|
* commit 784a5d26095e6021c47609a07f0befd0c4e7b745
Author: kim tae young <kty6307@naver.com>
Date: Thu Sep 26 17:12:40 2019 +0900
Hello.java add
admin@7-21 MINGW64 /d/project (hotfix)
$ git log --oneline --decorate /*한줄출력, */
930c87d (HEAD -> hotfix) hotfix index modified
92e4eab (master) 변경
42c331f .gitignore
69831e2 numberprint.java retrace
7ba02f8 numberprint.java untracked
eb13939 numberprint.java추가
b65162c Hello와 index 수정
e7371a4 이름추가
9f0b55a index.txt
77db84c print문 추가
47f5bdd main method add
784a5d2 Hello.java add
git rm [파일명] : 파일명으로 등록된 깃인덱스삭제
파일의 변경내용확인 : git diff [ 옵 션 ]
[-cached] : 인텍스와 head의 변경사항을 표시
[-staged] : 수정사항만 따로확인
admin@7-21 MINGW64 /d/project (master)
$ git diff --staged
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..da7b414
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+## Ȯ<C0><E5><C0>ڰ<A1> .md<C0><CE> <C6><C4><C0><CF> <B9><AB><BD><C3>
+*.md
\ No newline at end of file
파일내용변경 : vim [수정할파일이름]
admin@7-21 MINGW64 /d/project (hotfix)
$ vim index.txt
branch생성 : git branch [생성할branch이름]
branch변경 : git checkout [branch이름]
위치한 branch조회 : git branch
admin@7-21 MINGW64 /d/project (master)
$ git branch hotfix /*branch생성*/
admin@7-21 MINGW64 /d/project (master)
$ git branch
hotfix
* master /*현재 작업중인 branch위치확인*/
admin@7-21 MINGW64 /d/project (master)
$ git checkout hotfix /*branch이동*/
Switched to branch 'hotfix'
파일병합 : git merge [병합시킬 가지이름]
1. 정상적으로 merge성공했을 경우
admin@7-21 MINGW64 /d/project (master)
$ git merge hotfix
Updating 92e4eab..930c87d
Fast-forward
index.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
2. merge에 실패하였을 경우(같은 곳을 수정한 후 병합하면 conflict오류가 생긴다)
admin@7-21 MINGW64 /d/project (hotfix)
$ vim index.txt
admin@7-21 MINGW64 /d/project (hotfix)
$ git commit -a -m "hotfix index modified"
[hotfix f96f0c6] hotfix index modified
1 file changed, 2 insertions(+)
admin@7-21 MINGW64 /d/project (hotfix)
$ git checkout master
Switched to branch 'master'
admin@7-21 MINGW64 /d/project (master)
$ vim index.txt
admin@7-21 MINGW64 /d/project (master)
$ git commit -a -m "master index modified"
[master 347e5a0] master index modified
1 file changed, 1 insertion(+)
admin@7-21 MINGW64 /d/project (master)
$ git merge hotfix
Auto-merging index.txt
CONFLICT (content): Merge conflict in index.txt
Automatic merge failed; fix conflicts and then commit the result.
admin@7-21 MINGW64 /d/project (master|MERGING)
$ vim index.txt
admin@7-21 MINGW64 /d/project (master|MERGING)
$ git commit -a -m "master index modified2"
[master a044156] master index modified2
github clone and download
(다른사람이 올려놓은 파일다운받아서 변경 후 내 github주소로 올리기)
,변경내용발행하기
원격서버주소설정 : git remote add origin [원격 서버 주소]
서버올리기 : git push origin master
admin@7-21 MINGW64 /d/project (master)
$ git clone https://github.com/schacon/ticgit
Cloning into 'ticgit'...
remote: Enumerating objects: 1857, done.
Rremote: Total 1857 (delta 0), reused 0 (delta 0), pack-reused 1857
Receiving objects: 100% (1857/1857), 334.04 KiB | 591.00 KiB/s, done.
Resolving deltas: 100% (837/837), done.
admin@7-21 MINGW64 /d/project (master)
$ ls /*다운받은 파일이 추가됨*/
Hello.java index.txt numberprint.java readme.txt test.md ticgit/
admin@7-21 MINGW64 /d/project (master)
$ cd ticgit/ /*이동*/
admin@7-21 MINGW64 /d/project/ticgit (master)
$ git remote -v /*현재파일의 원격주소*/
origin https://github.com/schacon/ticgit (fetch)
origin https://github.com/schacon/ticgit (push)
admin@7-21 MINGW64 /d/project/ticgit (master)
$ echo ticgit > README /*README라는 파일생성*/
admin@7-21 MINGW64 /d/project/ticgit (master)
$ git status /*git의 현재상황*/
On branch master
Your branch is up to date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
README
nothing added to commit but untracked files present (use "git add" to track)
admin@7-21 MINGW64 /d/project/ticgit (master)
$ cat README
ticgit
admin@7-21 MINGW64 /d/project/ticgit (master)
$ git add README
warning: LF will be replaced by CRLF in README.
The file will have its original line endings in your working directory
admin@7-21 MINGW64 /d/project/ticgit (master)
$ git add README /*git에 README파일등록*/
admin@7-21 MINGW64 /d/project/ticgit (master)
$ git commit -m "README add" /*커밋*/
[master 758ae79] README add
1 file changed, 1 insertion(+)
create mode 100644 README
/*로그내용출력*/
admin@7-21 MINGW64 /d/project/ticgit (master)
$ git log
commit 758ae7997389cb58df372a38a87f9b9240adb7b6 (HEAD -> master)
Author: kim tae young <kty6307@naver.com>
Date: Fri Sep 27 15:58:54 2019 +0900
README add
commit 847256809a3d518cd36b8f81859401416fe8d945 (origin/master, origin/HEAD)
Author: Jeff Welling <Jeff.Welling@Gmail.com>
Date: Tue Apr 26 17:29:17 2011 -0700
Added note to clarify which is the canonical TicGit-ng repo
/*로그내용출력*/
admin@7-21 MINGW64 /d/project/ticgit (master)
$ cd ..
admin@7-21 MINGW64 /d/project (master)
$ git remote add origin https://github.com/tae-young-kim/test.git
admin@7-21 MINGW64 /d/project (master)
$ git remote -v
origin https://github.com/tae-young-kim/test.git (fetch)
origin https://github.com/tae-young-kim/test.git (push)
admin@7-21 MINGW64 /d/project (master)
$ git push origin master
Enumerating objects: 50, done.
Counting objects: 100% (50/50), done.
Delta compression using up to 4 threads
Compressing objects: 100% (41/41), done.
Writing objects: 100% (50/50), 4.11 KiB | 382.00 KiB/s, done.
Total 50 (delta 21), reused 0 (delta 0)
remote: Resolving deltas: 100% (21/21), done.
To https://github.com/tae-young-kim/test.git
* [new branch] master -> master
원격 저장소로부터 필요한 파일을 다운 (병합은 따로 해야 함)
: git fetch
admin@7-21 MINGW64 /d/project (master)
$ mkdir libgit
admin@7-21 MINGW64 /d/project (master)
$ cd libgit/
admin@7-21 MINGW64 /d/project/libgit (master)
$ git init
Initialized empty Git repository in D:/project/libgit/.git/
admin@7-21 MINGW64 /d/project/libgit (master)
$ git remote add pb https://github.com/libgit2/libgit2
admin@7-21 MINGW64 /d/project/libgit (master)
$ git remote -v
pb https://github.com/libgit2/libgit2 (fetch)
pb https://github.com/libgit2/libgit2 (push)
admin@7-21 MINGW64 /d/project/libgit (master)
$ git fetch pb
remote: Enumerating objects: 95786, done.
remote: Counting objects: 100% (95786/95786), done.
remote: Compressing objects: 100% (26012/26012), done.
remote: Total 95786 (delta 68026), reused 95784 (delta 68025), pack-reused 0
Receiving objects: 100% (95786/95786), 46.16 MiB | 8.05 MiB/s, done.
Resolving deltas: 100% (68026/68026), done.
From https://github.com/libgit2/libgit2
* [new branch] bindings/libgit2sharp/020_2 -> pb/bindings/libgit2sharp/020_2
* [new branch] bindings/libgit2sharp/022_1 -> pb/bindings/libgit2sharp/022_1
* [new branch] brianmario/attr-from-tree -> pb/brianmario/attr-from-tree
* [new branch] brianmario/revwalk-filter -> pb/brianmario/revwalk-filter
* [new branch] brianmario/trailer-info -> pb/brianmario/trailer-info
* [new branch] brianmario/trailer-list -> pb/brianmario/trailer-list
* [new branch] ci -> pb/ci
* [new branch] cmn/annotated-from-tag -> pb/cmn/annotated-from-tag
* [new branch] cmn/atexit-skeleton -> pb/cmn/atexit-skeleton
* [new branch] cmn/cancellation -> pb/cmn/cancellation
* [new branch] cmn/commit-on -> pb/cmn/commit-on
* [new branch] cmn/config-nonewline -> pb/cmn/config-nonewline
* [new branch] cmn/ctest-jobs -> pb/cmn/ctest-jobs
* [new branch] cmn/delta-base-eviction -> pb/cmn/delta-base-eviction
* [new branch] cmn/diff-binary-patch -> pb/cmn/diff-binary-patch
* [new branch] cmn/dynamic-libssh2 -> pb/cmn/dynamic-libssh2
* [new branch] cmn/example-pull -> pb/cmn/example-pull
* [new branch] cmn/expose-gitfile-check -> pb/cmn/expose-gitfile-check
* [new branch] cmn/forbid-mutiurl -> pb/cmn/forbid-mutiurl
* [new branch] cmn/index-add-conllision-extra -> pb/cmn/index-add-conllision-extra
* [new branch] cmn/init-ssh -> pb/cmn/init-ssh
* [new branch] cmn/io-stream-backends -> pb/cmn/io-stream-backends
* [new branch] cmn/leaks -> pb/cmn/leaks
* [new branch] cmn/not-opaque -> pb/cmn/not-opaque
* [new branch] cmn/parallel-clar -> pb/cmn/parallel-clar
* [new branch] cmn/pcre2 -> pb/cmn/pcre2
* [new branch] cmn/rc4 -> pb/cmn/rc4
* [new branch] cmn/read-only-size -> pb/cmn/read-only-size
* [new branch] cmn/remote-options -> pb/cmn/remote-options
* [new branch] cmn/repo-v1 -> pb/cmn/repo-v1
* [new branch] cmn/reset-dont-free-url -> pb/cmn/reset-dont-free-url
* [new branch] cmn/server -> pb/cmn/server
* [new branch] cmn/sortedcache-close -> pb/cmn/sortedcache-close
* [new branch] cmn/strict-object -> pb/cmn/strict-object
* [new branch] cmn/tmp -> pb/cmn/tmp
* [new branch] cmn/tree-parser-sort-input -> pb/cmn/tree-parser-sort-input
* [new branch] cmn/warnings -> pb/cmn/warnings
* [new branch] development -> pb/development
* [new branch] diff-fails-with-cpp-file -> pb/diff-fails-with-cpp-file
* [new branch] empty-name -> pb/empty-name
* [new branch] enterprise/backport-2.6-4136-4178 -> pb/enterprise/backport-2.6-4136-4178
* [new branch] enterprise/backport-2.7-4136-4178 -> pb/enterprise/backport-2.7-4136-4178
* [new branch] enterprise/backport-2.8-4136-4178 -> pb/enterprise/backport-2.8-4136-4178
* [new branch] enterprise/backport-2.9-4136-4178 -> pb/enterprise/backport-2.9-4136-4178
* [new branch] error-handling -> pb/error-handling
* [new branch] ethomson/027 -> pb/ethomson/027
* [new branch] ethomson/attr -> pb/ethomson/attr
* [new branch] ethomson/attrs_from_head -> pb/ethomson/attrs_from_head
* [new branch] ethomson/auth_failure -> pb/ethomson/auth_failure
* [new branch] ethomson/callback_names -> pb/ethomson/callback_names
* [new branch] ethomson/checkout_conflict_respect_index -> pb/ethomson/checkout_conflict_respect_index
* [new branch] ethomson/ci -> pb/ethomson/ci
* [new branch] ethomson/ci_nightly -> pb/ethomson/ci_nightly
* [new branch] ethomson/config_section_validity -> pb/ethomson/config_section_validity
* [new branch] ethomson/creds_for_scheme -> pb/ethomson/creds_for_scheme
* [new branch] ethomson/cvar -> pb/ethomson/cvar
* [new branch] ethomson/defer_cert_cred_cb_0_27 -> pb/ethomson/defer_cert_cred_cb_0_27
* [new branch] ethomson/deprecate -> pb/ethomson/deprecate
* [new branch] ethomson/deprecate_headlist -> pb/ethomson/deprecate_headlist
* [new branch] ethomson/docs -> pb/ethomson/docs
* [new branch] ethomson/docurium -> pb/ethomson/docurium
* [new branch] ethomson/error_messages -> pb/ethomson/error_messages
* [new branch] ethomson/flaky_ci -> pb/ethomson/flaky_ci
* [new branch] ethomson/https_proxy -> pb/ethomson/https_proxy
* [new branch] ethomson/ignore_leading_slash -> pb/ethomson/ignore_leading_slash
* [new branch] ethomson/ignore_skip_bom -> pb/ethomson/ignore_skip_bom
* [new branch] ethomson/ignore_spaces -> pb/ethomson/ignore_spaces
* [new branch] ethomson/is_and_from -> pb/ethomson/is_and_from
* [new branch] ethomson/issue-4203 -> pb/ethomson/issue-4203
* [new branch] ethomson/largefiles_32bit -> pb/ethomson/largefiles_32bit
* [new branch] ethomson/netrefactor -> pb/ethomson/netrefactor
* [new branch] ethomson/nightlies -> pb/ethomson/nightlies
* [new branch] ethomson/ntlm -> pb/ethomson/ntlm
* [new branch] ethomson/ntlm2 -> pb/ethomson/ntlm2
* [new branch] ethomson/object_size -> pb/ethomson/object_size
* [new branch] ethomson/off_t -> pb/ethomson/off_t
* [new branch] ethomson/opts_init -> pb/ethomson/opts_init
* [new branch] ethomson/pcre -> pb/ethomson/pcre
* [new branch] ethomson/pcre_warnings -> pb/ethomson/pcre_warnings
* [new branch] ethomson/racy-diff -> pb/ethomson/racy-diff
* [new branch] ethomson/smart_transport_url_027 -> pb/ethomson/smart_transport_url_027
* [new branch] ethomson/ssl_proxy -> pb/ethomson/ssl_proxy
* [new branch] ethomson/stream-truncated-writes -> pb/ethomson/stream-truncated-writes
* [new branch] ethomson/to_from -> pb/ethomson/to_from
* [new branch] ethomson/urlparse_empty_port -> pb/ethomson/urlparse_empty_port
* [new branch] ethomson/v0_28_1 -> pb/ethomson/v0_28_1
* [new branch] ethomson/warnings -> pb/ethomson/warnings
* [new branch] ethomson/win32_hash -> pb/ethomson/win32_hash
* [new branch] ethomson/winauth -> pb/ethomson/winauth
* [new branch] ethomson/windows_init_traversal -> pb/ethomson/windows_init_traversal
* [new branch] features/push_old -> pb/features/push_old
* [new branch] fileops -> pb/fileops
* [new branch] gh-pages -> pb/gh-pages
* [new branch] hf/021_patch -> pb/hf/021_patch
* [new branch] hf/libgit2sharp_020_patch -> pb/hf/libgit2sharp_020_patch
* [new branch] hf/master_patch -> pb/hf/master_patch
* [new branch] jss/fix-ignore-pop -> pb/jss/fix-ignore-pop
* [new branch] maint/v0.21 -> pb/maint/v0.21
* [new branch] maint/v0.22 -> pb/maint/v0.22
* [new branch] maint/v0.23 -> pb/maint/v0.23
* [new branch] maint/v0.24 -> pb/maint/v0.24
* [new branch] maint/v0.25 -> pb/maint/v0.25
* [new branch] maint/v0.26 -> pb/maint/v0.26
* [new branch] maint/v0.27 -> pb/maint/v0.27
* [new branch] maint/v0.28 -> pb/maint/v0.28
* [new branch] master -> pb/master
* [new branch] new-error-handling -> pb/new-error-handling
* [new branch] ntk/appveyor_install -> pb/ntk/appveyor_install
* [new branch] origin/ethomson/defer_cert_cred_cb_0_27 -> pb/origin/ethomson/defer_cert_cred_cb_0_27
* [new branch] packed-refs-race -> pb/packed-refs-race
* [new branch] precompose-test -> pb/precompose-test
* [new branch] rb/commit-modified-file -> pb/rb/commit-modified-file
* [new branch] rb/object-parse-flexibility -> pb/rb/object-parse-flexibility
* [new branch] rb/test-builtin-drivers -> pb/rb/test-builtin-drivers
* [new branch] rb/warnings-for-commit-headers -> pb/rb/warnings-for-commit-headers
* [new branch] threading-docs -> pb/threading-docs
* [new branch] threadsafe -> pb/threadsafe
* [new branch] users/ethomson/security_updates -> pb/users/ethomson/security_updates
* [new branch] vmg/read-types -> pb/vmg/read-types
* [new branch] vmg/repo-format-1 -> pb/vmg/repo-format-1
* [new tag] v0.21.3 -> v0.21.3
* [new tag] v0.21.5 -> v0.21.5
* [new tag] v0.22.3 -> v0.22.3
* [new tag] v0.23.4 -> v0.23.4
* [new tag] v0.24.0-rc1 -> v0.24.0-rc1
* [new tag] v0.24.6 -> v0.24.6
* [new tag] v0.26.8 -> v0.26.8
* [new tag] v0.27.9 -> v0.27.9
* [new tag] v0.28.3 -> v0.28.3
* [new tag] v0.1.0 -> v0.1.0
* [new tag] v0.10.0 -> v0.10.0
* [new tag] v0.11.0 -> v0.11.0
* [new tag] v0.12.0 -> v0.12.0
* [new tag] v0.13.0 -> v0.13.0
* [new tag] v0.14.0 -> v0.14.0
* [new tag] v0.15.0 -> v0.15.0
* [new tag] v0.16.0 -> v0.16.0
* [new tag] v0.17.0 -> v0.17.0
* [new tag] v0.18.0 -> v0.18.0
* [new tag] v0.19.0 -> v0.19.0
* [new tag] v0.2.0 -> v0.2.0
* [new tag] v0.20.0 -> v0.20.0
* [new tag] v0.21.0 -> v0.21.0
* [new tag] v0.21.0-rc1 -> v0.21.0-rc1
* [new tag] v0.21.0-rc2 -> v0.21.0-rc2
* [new tag] v0.21.1 -> v0.21.1
* [new tag] v0.21.2 -> v0.21.2
* [new tag] v0.21.4 -> v0.21.4
* [new tag] v0.22.0 -> v0.22.0
* [new tag] v0.22.0-rc1 -> v0.22.0-rc1
* [new tag] v0.22.0-rc2 -> v0.22.0-rc2
* [new tag] v0.22.1 -> v0.22.1
* [new tag] v0.22.2 -> v0.22.2
* [new tag] v0.23.0 -> v0.23.0
* [new tag] v0.23.0-rc1 -> v0.23.0-rc1
* [new tag] v0.23.0-rc2 -> v0.23.0-rc2
* [new tag] v0.23.1 -> v0.23.1
* [new tag] v0.23.2 -> v0.23.2
* [new tag] v0.23.3 -> v0.23.3
* [new tag] v0.24.0 -> v0.24.0
* [new tag] v0.24.1 -> v0.24.1
* [new tag] v0.24.2 -> v0.24.2
* [new tag] v0.24.3 -> v0.24.3
* [new tag] v0.24.4 -> v0.24.4
* [new tag] v0.24.5 -> v0.24.5
* [new tag] v0.25.0 -> v0.25.0
* [new tag] v0.25.0-rc1 -> v0.25.0-rc1
* [new tag] v0.25.0-rc2 -> v0.25.0-rc2
* [new tag] v0.25.1 -> v0.25.1
* [new tag] v0.26.0 -> v0.26.0
* [new tag] v0.26.0-rc1 -> v0.26.0-rc1
* [new tag] v0.26.0-rc2 -> v0.26.0-rc2
* [new tag] v0.26.1 -> v0.26.1
* [new tag] v0.26.2 -> v0.26.2
* [new tag] v0.26.3 -> v0.26.3
* [new tag] v0.26.4 -> v0.26.4
* [new tag] v0.26.5 -> v0.26.5
* [new tag] v0.26.6 -> v0.26.6
* [new tag] v0.26.7 -> v0.26.7
* [new tag] v0.27.0 -> v0.27.0
* [new tag] v0.27.0-rc1 -> v0.27.0-rc1
* [new tag] v0.27.0-rc2 -> v0.27.0-rc2
* [new tag] v0.27.0-rc3 -> v0.27.0-rc3
* [new tag] v0.27.1 -> v0.27.1
* [new tag] v0.27.2 -> v0.27.2
* [new tag] v0.27.3 -> v0.27.3
* [new tag] v0.27.4 -> v0.27.4
* [new tag] v0.27.5 -> v0.27.5
* [new tag] v0.27.6 -> v0.27.6
* [new tag] v0.27.7 -> v0.27.7
* [new tag] v0.27.8 -> v0.27.8
* [new tag] v0.28.0 -> v0.28.0
* [new tag] v0.28.0-rc1 -> v0.28.0-rc1
* [new tag] v0.28.1 -> v0.28.1
* [new tag] v0.28.2 -> v0.28.2
* [new tag] v0.3.0 -> v0.3.0
* [new tag] v0.8.0 -> v0.8.0
admin@7-21 MINGW64 /d/project/libgit (master)
$ git merge pb/master
init로 설정해놓은 libgit폴더에 들어가보면 다운받은 파일들을 볼 수 있다
이클립스(eclipse)에서 git사용하기
git을 사용할 프로젝트우클릭 >> Team >> Shared Project
프로젝트선택 >> Create Repository클릭
*프로젝트우클릭 >> Team >> Ignore(ignore파일생성)
gitignore.io에서 ignore시킬 내용을 선택하여 ignore의 내용을 생성한다
(검색창에 java, eclipse, java-web, code-java선택)
내용을 eclipse안에 있는 ignore파일에 넣어준다
*파일의 수정후에 commit하는 경우
변경된 파일을 선택 후 +버튼클릭
Commit Message에 코멘트를 적은 후 오른쪽아래에 Commit을 누르면 완료
*History에서 프로젝트이름을 누르면 현재까지의 로그가 보여진다
*이클립스(eclipse)내에서 branch변경하기
프로젝트 우클릭 >> Team >> Switch TO >> 변경할 Branch를 선택한다 >> 변경완료
*commit되돌리기 History >> revert시킬 부분 우클릭 >> Revert Commit
(revert를 다시 revert시킬 수도 있다)
*Reset >> Soft : Git Staging 에 올라와있는 상태
>> Mixed : Unstaged Changes에 있는 상태
>> Hard : History와 내용 모두 삭제됨
*Clone(프로젝트복제)
https://github.com/pH-7/Simple-Java-Calculator
안의 주소복사후 이클립스에 import
여기에서 원저작자에 대한 요청을 할 수 있다
*PUSH
github사이트에서 gittest라는 새로운 repository생성 후 주소복사
*Commit Push 동시에 하기
파일생성or수정 후 commit and push 클릭
*원격(github)파일과 로컬파일이 다른경우
(ex)팀프로젝트의 서로 다른사람이 서로 다른파일을 수정한 후 commit하는 경우)
github의 gittest repository에서 actionforward.java파일 수정 후
commit(default생성자추가부분)
다른 파일 수정 후 commit and push클릭 시 rejected가 뜬다
(원격과 로컬이 일치하지 않기 때문)
Close를 눌러준다
github에서 변경된 내용 확인
*repository삭제
*팀원들 초대하기
(github에서 collaborators에 초대하면 초대받은사람이 메일을 통해 승낙 or 거절)