Dev/Git
Git 명령어 1
z
2021. 8. 16. 15:18
728x90
🐯 < Create a Repository >
Create a new local repository
$ git init [project name]
Download from an existing repository
$ git clone my_url
🦊 < Observe your Repository >
List new or modified files not yet committed
$ git status
Show the changes to files not yet staged
$ git diff
Show the changes to staged files
$ git diff --cached
Show all staged and unstaged file changes
$ git diff HEAD
Show the changes between two commit ids
$ git diff commit1 commit2
List the change dates and authors for a file
$ git blame [file]
Show the file changes for a commit id and/or file
$ git show [commit]:[file]
Show full change history
$ git log
Show change history for file/directory including diffs
$ git log -p [file/directory]
728x90