- What is Git and What is Git used for?
- Is Git the same thing as GitHub?
- How do I get started with Git?
- Git is a VCS - Version Control System. A VCS like Git allows you to manage multiple versions of a file or files, make changes called commits, and keep track of those changes over time. Rather than saving multiple versions of the same file, each with a more convoluted naming structure than the last, you can use git to make those changes, stage them to be finalized, and then commit those changes to the repository when you are certain of them.
- Simply put: No. They are different things. They might have somewhat similar functions, but they focus on different aspects. Git can be thought of as a Local VCS, for managing versions on your single computer while GitHub is more of a Cloud platform with some collaborative functions built it. Think of GitHub as an online repository, so that your team can work on the same files or code, no matter where they are.
- To initilize Git Tracking, you need to navigate to the directory that you wish to track using the
cd
command in terminal. for example, you would typecd projects/project_1
to navigate to the project_1 directory. Then, to begin tracking with Git, type
git init
Some other Git Commands for Terminal
git add <file name>
: Stages the file for commit.git commit -m
: commits snapshot.git diff
: Shows changes that have been made.