♐ Git : Git is a version control system that allows developers to track changes to their code over time. It tracks code changes, creates branches for experimentation, and merges changes. It's essential for collaboration, version control, and project management.
πVersion control system for tracking changes to code.
πAllows developers to work on the same codebase simultaneously.
πCreates branches for independent work on new features or bug fixes.
π Merges changes back into the main codebase when ready.
♐ GitHub : It is a web-based platform built on top of Git. It provides additional features like hosting repositories(folders) in the cloud like we can save our files in cloud, it helps to developers by code sharing, issue tracking, and project management.
πGitHub stores your code in the cloud, making it accessible from anywhere with an internet connection.
πGitHub offers features like pull requests and code review, enabling teams to work together efficiently.
πDevelopers use GitHub to contribute to open-source projects, share code, and learn from others.
Mostly used Git commands:
π git init: Initializes a new Git repository in the current directory.
π git clone [url]: Copies an existing Git repository from a remote server(from our github account) to your local machine.
π git add [file]: Adds a file to the staging area, ready to be committed.
π git commit -m "[message]": Commits changes to the repository with a descriptive message.
π git status: Shows the current status of the repository, including tracked/untracked files and changes.
π git pull: Fetches changes from the remote repository and merges them into your local branch.
π git push: Pushes your local commits to the remote repository.
π git branch: Lists all branches in the repository.
π git checkout [branch]: Switches to a different branch.
π git merge [branch]: Merges changes from a specified branch into the current branch.
Comments
Post a Comment