Git Extensions 정리

suni_develop·2024년 9월 13일

Git 사용법

목록 보기
1/3

Git 사용 강의를 듣던 도중 VSCode에서 사용하기 좋은 Git 관련 Extension들을 추천해 주셨다. 시키는 것만 하려다가 설명이 뜨길래 쭉 읽으면서 간단히 정리해 보겠다.
차례대로 Git Gragh, Git History, Git Lense다.

---- Git Gragh ----

내 repository에 대한 git graph를 볼 수 있다! 그리고 git 기능들을 graph에서 편리하게 사용 가능하다. 원하는 대로 보여지는 방식을 변경 가능하다!

나머지는 걍 복붙한다.
단축키도 있으니 필요하면 설명 다시 찾아볼것

Git Graph View:

Display:

Local & Remote Branches
Local Refs: Heads, Tags & Remotes
Uncommitted Changes

Perform Git Actions (available by right clicking on a commit / branch / tag):

Create, Checkout, Delete, Fetch, Merge, Pull, Push, Rebase, Rename & Reset Branches
Add, Delete & Push Tags
Checkout, Cherry Pick, Drop, Merge & Revert Commits
Clean, Reset & Stash Uncommitted Changes
Apply, Create Branch From, Drop & Pop Stashes
View annotated tag details (name, email, date and message)
Copy commit hashes, and branch, stash & tag names to the clipboard

View commit details and file changes by clicking on a commit. On the Commit Details View you can:

View the Visual Studio Code Diff of any file change by clicking on it.
Open the current version of any file that was affected in the commit.
Copy the path of any file that was affected in the commit to the clipboard.
Click on any HTTP/HTTPS url in the commit body to open it in your default web browser.

Compare any two commits by clicking on a commit, and then CTRL/CMD clicking on another commit. On the Commit Comparison View you can:

View the Visual Studio Code Diff of any file change between the selected commits by clicking on it.
Open the current version of any file that was affected between the selected commits.
Copy the path of any file that was affected between the selected commits to the clipboard.

Code Review - Keep track of which files you have reviewed in the Commit Details & Comparison Views.

Code Review's can be performed on any commit, or between any two commits (not on Uncommitted Changes).
When a Code Review is started, all files needing to be reviewed are bolded. When you view the diff / open a file, it will then be un-bolded.
Code Reviews persist across Visual Studio Code sessions. They are automatically closed after 90 days of inactivity.

View uncommitted changes, and compare the uncommitted changes with any commit.

Hover over any commit vertex on the graph to see a tooltip indicating:

Whether the commit is included in the HEAD.
Which branches, tags and stashes include the commit.

Filter the branches shown in Git Graph using the 'Branches' dropdown menu. The options for filtering the branches are:

Show All branches
Select one or more branches to be viewed
Select from a user predefined array of custom glob patterns (by setting git-graph.customBranchGlobPatterns)

Fetch from Remote(s) (available on the top control bar)
Find Widget allows you to quickly find one or more commits containing a specific phrase (in the commit message / date / author / hash, branch or tag names).

Repository Settings Widget:

Allows you to view, add, edit, delete, fetch & prune remotes of the repository.
Configure "Issue Linking" - Converts issue numbers in commit messages into hyperlinks, that open the issue in your issue tracking system.

Configure "Pull Request Creation" - Automates the opening and pre-filling of a Pull Request form, directly from a branches context menu.
  Support for the publicly hosted Bitbucket, GitHub and GitLab Pull Request providers is built-in.
  Custom Pull Request providers can be configured using the Extension Setting git-graph.customPullRequestProviders (e.g. for use with privately hosted Pull Request providers). Information on how to configure custom providers is available here.
  
Export your Git Graph Repository Configuration to a file that can be committed in the repository. It allows others working in the same repository to automatically use the same Git Graph configuration.

---- Git History ----

그래프와 디테일에 대한 깃 로그를 볼 수 있고, 검색할 수 있다.
지난 파일의 사본을 볼 수 있다.
history를 보고 검색할 수 있다.

Available Commands :
View Git History (git log) (git.viewHistory)
View File History (git.viewFileHistory)
View Line History (git.viewLineHistory)

그리고 위 기능들의 단축키를 지정할 수 있다!

---- Git Lense ----

GitLense를 쓴다면? 당신은 코드를 보다 잘 이해하고, 쓰고, 리뷰할 수 있다!
유료 기능도 있지만 우선 무료기능만 써본다.

GitLense를 사용하면 Git CodeLense를 통해 누가 언제 어떻게 이 코드를 수정하고 작성했는지 알려준다!

그리고 코드가 어떤 과정을 거쳐 변화했는지 history를 보여준다!

---- The End ----

*용어 정리
1) untapped : 아직 손대지 않은
2) on-damand : 요구할 때 즉시
3) miscellaneous : 여러 가지 종류의, 이것저것 다양한

profile
렛츠고

0개의 댓글