Gitを使いこなすには4
Gitに登録できたから、神髄の履歴機能はどうやってつかうのかしら。
コマンドラインで同じことをしてみた。
user@CS03432 MINGW64 ~/github/text ((7c2b3d8...))
$ pwd
/c/Users/user/github/text
user@CS03432 MINGW64 ~/github/text ((7c2b3d8...))
$ cd ..
user@CS03432 MINGW64 ~/github
$ mkdir lesson
user@CS03432 MINGW64 ~/github
$ pwd
/c/Users/user/github
user@CS03432 MINGW64 ~/github
$ ls
lesson/ sample/ text/
user@CS03432 MINGW64 ~/github
$ cd lesson
user@CS03432 MINGW64 ~/github/lesson
$ git init
Initialized empty Git repository in C:/Users/user/github/lesson/.git/
user@CS03432 MINGW64 ~/github/lesson (master)
$ ls -al
total 4
drwxr-xr-x 1 user 197609 0 Jan 1 12:25 ./
drwxr-xr-x 1 user 197609 0 Jan 1 12:24 ../
drwxr-xr-x 1 user 197609 0 Jan 1 12:25 .git/
user@CS03432 MINGW64 ~/github/lesson (master)
$ vi testes.txt
user@CS03432 MINGW64 ~/github/lesson (master)
$ git status
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
testes.txt
nothing added to commit but untracked files present (use "git add" to track)
user@CS03432 MINGW64 ~/github/lesson (master)
$ git add testes.txt
warning: in the working copy of 'testes.txt', LF will be replaced by CRLF the next time Git touches it
user@CS03432 MINGW64 ~/github/lesson (master)
$ git add testes.txt
user@CS03432 MINGW64 ~/github/lesson (master)
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: testes.txt
user@CS03432 MINGW64 ~/github/lesson (master)
$ git commit -m "テストコミット"
[master (root-commit) f5df6c2] テストコミット
1 file changed, 1 insertion(+)
create mode 100644 testes.txt
user@CS03432 MINGW64 ~/github/lesson (master)
$ git log
commit f5df6c224d3dbe1579fcd253c426e53b91eb3817 (HEAD -> master)
Author: samy <tashiro.satomi@gmail.com>
Date: Mon Jan 1 12:33:53 2024 +0900
テストコミット
user@CS03432 MINGW64 ~/github/lesson (master)
$
この記事が気に入ったらサポートをしてみませんか?