Name=Sandesh Mahato
Git is a version control system (VCS) that tracks changes in code. It is popular among developers worldwide, free, open-source, fast, and scalable.
-
Tracking the history of code changes.
-
Collaboration among developers.
GitHub is a web-based platform built on top of Git. It provides hosting for Git repositories and additional features for collaboration, project management, and deployment.
-
README file: Contains a project's description, features, and other details.
-
Repository (repo): A folder that contains your project's files.
-
Add (staged): To start tracking a new or modified file.
-
Commit: To finalize the changes after adding.
-
Untracked file: A new file not tracked by Git.
-
Modified file: A file with changes that haven't been committed.
-
Staged: A file ready to be committed.
-
Unmodified file: A file with no changes.
-
Download Git: Install Git on your PC.
-
Configure Git in the terminal:
bash
git config --global user.name "your name"
git config --global user.email "example@email.com"
git config --list
- Clone and Status:
- Clone: Duplicate a repository from a remote repo to your local machine.
bash
git clone
- Status: Display the status of code.
bash
git status
- Add and Commit:
- Add (stage): Add new or modified files from the working area to the Git repository.
bash
git add . # Add all files
git add # Add specific file
- Commit: Record changes or modifications.
bash
git commit -m "meaningful title"
- Push:
- Push: Upload local repository content to the remote repository (e.g., GitHub).
bash
git push origin