Closed yashinomi closed 4 years ago
これはリモート
$ echo "new commit from remot 2" >> hoge.txt
$ git commit -a
[master 3620bc9] commit from remote
1 file changed, 1 insertion(+)
これはクローン。
$git pull [17:18:51]
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 280 bytes | 93.00 KiB/s, done.
From /Users/hayashi-kazuki1/Documents/TokyoTech/class/2020/システム開発応用/workdir
11b2f29..3620bc9 master -> origin/master
Updating 11b2f29..3620bc9
Fast-forward
hoge.txt | 1 +
1 file changed, 1 insertion(+)
ログ。
$ git log --graph --all --decorate=full [17:20:55]
* commit 3620bc939a84065e5ad492e00582428d7b1eaf73 (HEAD -> refs/heads/master, refs/remotes/origin/ma
| Author: yashinomi
| Date: Fri Oct 30 17:17:58 2020 +0900
|
| commit from remote
|
* commit 11b2f2995963c285c50e4d5b621c832a786d0770
| Author: yashinomi
| Date: Fri Oct 30 17:16:28 2020 +0900
|
| another commit from clone
|
* commit 11c42a4d9d7545c17526b82fe3e5db8ee06c9c59
|\ Merge: e235151 01b37dd
| | Author: yashinomi
| | Date: Fri Oct 30 17:01:17 2020 +0900
| |
| | Merge branch 'master' of /PathToWorkspace
| |
| * commit 01b37ddf2d5c243641a3a99f7e0e1cb98ce60721
| |\ Merge: c210e09 77600cd
| | | Author: yashinomi
| | | Date: Fri Oct 30 16:58:34 2020 +0900
| | |
| | | Merge branch 'main' of yashi_hub:yashinomi/git_practice
これはリモート
$ echo "new commit from remot 3" >> hoge.txt
$ git commit -a
[master 2929364] commit from remote. trying rebase. only change remote
1 file changed, 1 insertion(+)
これはクローン。
$ git pull --rebase
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 306 bytes | 153.00 KiB/s, done.
From /PathToWorkspace/workdir
3620bc9..2929364 master -> origin/master
Updating 3620bc9..2929364
Fast-forward
hoge.txt | 1 +
1 file changed, 1 insertion(+)
Current branch master is up to date.
ログ。
$git log --graph --all --decorate=full
* commit 29293644e01c48f462d5b73e9a2019ec63775711 (HEAD -> refs/heads/master, refs/remotes/origin/ma
| Author: yashinomi
| Date: Fri Oct 30 17:23:30 2020 +0900
|
| commit from remote. trying rebase. only change remote
|
* commit 3620bc939a84065e5ad492e00582428d7b1eaf73
| Author: yashinomi
| Date: Fri Oct 30 17:17:58 2020 +0900
|
| commit from remote
|
* commit 11b2f2995963c285c50e4d5b621c832a786d0770
| Author: yashinomi
| Date: Fri Oct 30 17:16:28 2020 +0900
|
| another commit from clone
|
* commit 11c42a4d9d7545c17526b82fe3e5db8ee06c9c59
|\ Merge: e235151 01b37dd
| | Author: yashinomi
| | Date: Fri Oct 30 17:01:17 2020 +0900
| |
| | Merge branch 'master' of /PathToWorkspace
remote のみの変更だと、マージでもリベースでも大した変化はない。
Pull における二つの戦略。マージとリベース。