·         Some git command:

CommandDescription
git initInitialize a new git repository in the current directory.
git clone Clone a remote repository to your local machine.
git add Stage changes in a file for the next commit.
git commit -m “commit message”Commit staged changes with a descriptive message.
git statusShow the status of your working directory and staged changes.
git logDisplay a log of commit history.
git diffShow the differences between the working directory and the last commit.
git pullFetch and integrate changes from a remote repository into your branch.
git push Push local changes to a remote repository.
git branchList all branches in the repository.
git checkout Switch to a different branch.
git merge Merge changes from one branch into the current branch.
git remote -vDisplay a list of remote repositories and their urls.
git fetchDownload objects and refs from a remote repository.
git reset —hard Reset the working directory to a specific commit and discard changes.
git stashTemporarily save changes that are not ready to be committed.
git tag Create a new tag for a specific commit.
git config —global user.name “your name”Set your name for commit authorship.
git config —global user.email “you@example.comSet your email for commit authorship.

·         Five git command to add git

CommandDescription
git add —all or git add -aAdds all changes, including new files, modifications, and deletions.
git add .Adds all changes in the current directory (including subdirectories).
git add *Adds all changes in the current directory, excluding deletions.
git add Adds specific file to the staging area for the next commit.
git add /Adds a specific file in to the staging area.

·         Four  type of git remove command:

CommandDescription
git rm test.txtRemoves the file named test.txt from the working directory and stages the deletion for the next commit.
git rm test.txt -fForces the removal of test.txt even if it’s modified and stages the deletion for the next commit.
git rm —cached test.txtRemoves test.txt from the index or the staging area but retains the file in the working directory.
git rm folder1Removes the entire folder1 directory and its contents from the working directory and stages the deletion.
git rm -r folder1Recursively removes the folder1 directory and its contents from the working directory, stages the deletion.

·         Some command for windows and linux CMD:

CommandDescription
clearClears the terminal screen.
touch text.txtCreates a new empty file named text.txt.
mkdir folder1Creates a new directory named folder1.
rmdir folder1Deletes an empty directory named folder1.
pwdDisplays the current working directory (current path).
cd folder1Changes the current directory to folder1.
cd ../Moves up one directory level from the current directory.
nano text.txtOpens the text.txt file for editing. If the file doesn’t exist, it creates a new one.
cat text.txtDisplays the contents of the text.txt file.
cat > text.txtCreates or overwrites the text.txt file with the text you enter. Press Ctrl+D to finish.

·         Git vocabulary command:

TermDescription
Working DirectoryThe local project folder where you make changes. Files here can be staged for commit using git add.
StageAn intermediate area where changes are prepared for commit. Files here can be committed using git commit.
Local RepositoryThe local version of the repository that tracks changes. Commits from the stage are saved here.
Git CloneCommand used to copy an existing GitHub repository to your local machine.
Git StatusCommand to check if there are any changes in the working directory that are not yet committed.
UntrackRefers to newly created files in the working directory that are not yet staged for commit.
ForkA copy of a repository that allows you to make changes without affecting the original repository.
.gitignoreA file used to specify files or patterns that Git should ignore when checking for changes.

·         Merge in tortoise git:

Ans: Switch to main > git sync (pull) >Switch another branch (where we need to merge) > select merge > select main from currenct branch    

·         Conflict solve tortoise git:

Ans: Select click file > Explore to > keep head or branch

·         Revert specific commot in tortoise git:

Ans : Select show log > select commit > Reset > Select last one hard reset