You can easily find GUI to accomplish following operations these days but here are some of the most commonly used Git commands, along with brief explanations and examples:
git init: This command initializes a new Git repository in the current directory. It creates a new
.gitdirectory that stores all the information required to track changes in the repository.
$ git init
git clone: This command creates a local copy of a remote Git repository. The repository can be on a remote server or on a local network.
$ git clone https://github.com/user/repo.git
git add: This command adds a file or group of files to the staging area, which is where changes are tracked before being committed to the repository.
$ git add file1.txt file2.txt
git commit: This command records changes to the repository. When you run
git commit, you must also provide a message that describes the changes you're committing.
$ git commit -m "Fixed a bug in the code"
git status: This command shows the status of the repository, including any changes that have not yet been staged or committed.
$ git status
git diff: This command shows the differences between the current version of the code and the latest commit.
$ git diff
git log: This command shows a history of all the commits made to the repository.
$ git log
git checkout: This command allows you to switch between different branches or to a specific commit.
$ git checkout master
git branch: This command allows you to create, list, or delete branches.
$ git branch new-feature
git merge: This command combines the changes from one branch into another branch.
$ git merge new-feature
These are some of the most commonly used Git commands, but there are many more available to help you manage your Git repositories.