Summary of Git and GitHub

Β·

2 min read

In this blog , I'm just gonna give summary of Git and GitHub and some commonly used commands

Many YouTube awesome resources are available for Git and GitHub you can refer to that and huge shoutout to @kunalkushwaha do checkout his YouTube video on git and GitHub

Git is a version control system that allows you to keep track of changes in your code and collaborate with others. GitHub is a web-based platform that uses Git for version control and provides additional features like issue tracking, code review, and project management. Here are some common Git and GitHub commands:

Git Commands:

git init: Initializes a new Git repository.

git clone: Clones an existing Git repository to your local machine.

git add: Adds changes to the staging area.

git commit: Commits changes to the local repository with a message.

git push: Pushes committed changes to a remote repository.

git pull: Fetches changes from a remote repository and merges them with the local repository.

git branch: Creates a new branch or lists existing branches.

git checkout: Switches to a different branch or restores a file to a previous version.

git merge: Merges changes from one branch into another branch.

git diff: Shows the difference between two versions of a file.

GitHub Commands:

git remote add: Adds a remote repository to your local Git repository.

git remote -v: Lists all the remote repositories.

git fetch: Fetches changes from a remote repository but doesn't merge them with the local repository.

git pull-request: Creates a pull request to merge changes from a branch into another branch.

git issues: Lists all the issues in a repository.

git commit -m "[issue #<issue number>]": Commits a change with a reference to an issue.

git tag: Creates a new tag for a specific commit.

git stash: Temporarily saves changes that aren't ready to be committed.

These are just a few of the many Git and GitHub commands available. It's important to familiarize yourself with them to make the most of these powerful tools.

Did you find this article valuable?

Support THARUN by becoming a sponsor. Any amount is appreciated!

Β