What is Git?
A distributed version control system that records and manages the history of changes to files. Changes edited in the working directory are registered in the staging area with git add, recorded in the local repository with git commit, and sent to a remote repository such as GitHub with git push. Branches allow parallel development and are integrated with git merge. Besides source code, it is also used to manage RTL, verification testbenches, scripts and so on.
Japanese name: Git
Git appears in 6 practice questions across 3 topics, including Linux and Command-Line Basics, Software Development and Project Management, Cloud and Container Basics.
Field: Linux and Command-Line Basics
FAQ
What is the difference between Git and GitHub?
Git is the version control software itself, running on your own computer. GitHub is a web service that hosts Git repositories and adds features such as reviews through pull requests and issue management. There are similar services such as GitLab, and servers kept in-house, and Git itself can be used with any of them.
How do I undo the last commit?
If it has not been pushed yet, git commit --amend can fix the last commit and git reset can undo it. For a commit already pushed and shared, it is safer to use git revert, which adds the undoing change as a new commit, so that it does not conflict with other people's histories.