Gitインストールとローカルストレージコミット管理
4993 ワード
1.Gitのコンピュータにインストールする
Gitのダウンロード
2.ローカルリポジトリの作成ローカルストレージとは?
マイコンピュータフォルダ Gitによるバージョン管理
->tip: .フォルダ名は通常、非表示のファイルを表します.
3.初回発行の作成提出とは何ですか?
Gitが生成した各バージョンを「コミット」(Commit)と呼ぶ. 私の情報を登録して、管理バージョン に使用します.にコミットするファイル に追加するファイルを選択します.コミットで を詳細に説明する方法
4.2番目のコミット
commit----(コミットID)----
別のコミットに移動する場合は、7番目または完全なidをコピーするだけです.
6.最新のコミットに戻る
Gitのダウンロード
2.ローカルリポジトリの作成
マイコンピュータフォルダ
$ git init
Initialized empty Git repository in C:/Users/myeongmoon00/Desktop/Programming/Test/.git/
Gitで作成したバージョンの情報とリモートストレージアドレスが格納された.gitというフォルダが作成されます.->tip: .フォルダ名は通常、非表示のファイルを表します.
3.初回発行の作成
Gitが生成した各バージョンを「コミット」(Commit)と呼ぶ.
$ git config --global user.email "USER 이메일"
$ git config --global user.name " USER 이름"
$ git add (커밋하고 싶은 파일)
$ git commit -m "상세 설명"
[master (root-commit) e4fe76d] 상세 설명
1 file changed, 1 insertion(+)
create mode 100644 README.txt
-m:「message」の略「包む」でいいです.4.2番目のコミット
$ git add README.txt
$ git commit -m "설명 업데이트"
5.別のコミットに移動$ git log
commit 333ee80e43a17e0b081e2da247e407cb61806a14 (HEAD -> master)
Author: ???????? - <???????>
Date: Tue Jan 11 21:34:38 2022 +0900
설명 업데이트
commit e4fe76dd0587da42c789a946f3520c4ecb50cf6a
Author: ???????? - <???????>
Date: Tue Jan 11 21:32:54 2022 +0900
사이트 설명 추가
gitログは最新のコミット順に表示されます.commit----(コミットID)----
別のコミットに移動する場合は、7番目または完全なidをコピーするだけです.
$ git checkout (commitID)
$ git checkout e4fe76dd0587da42c789a946f3520c4ecb50cf6a
Note: switching to 'e4fe76dd0587da42c789a946f3520c4ecb50cf6a'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e4fe76d 사이트 설명 추가
HEAD is now at e 4 fe 76 dのWebサイトの説明は、対応するコミットに追加されます.6.最新のコミットに戻る
$ git check out 333ee80e43a17e0b081e2da247e407cb61806a14
OR
$ git checkout -
$git checkout -
Previous HEAD position was e4fe76d 사이트 설명 추가
Switched to branch 'master'
Reference
この問題について(Gitインストールとローカルストレージコミット管理), 我々は、より多くの情報をここで見つけました https://velog.io/@myha001227/Git-설치-및-로컬저장소-커밋-관리テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol