Skip to content

Md-Soliman-Ali/Git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

The git init command is used to initialise a blank repository. It creates a .git folder in the current working directory.

Step 01 -> git init

The git add command is used to add changes in the current directory to the staging area.

Step 02 -> git add .

The git commit is used to save the changes to the local repository. The command helps us keep record of all the changes made.

Step 03 -> git commit -m "commit message"

The git status command is used to display the state of the current repository and the staging area.

Step 04 -> git status

The git merge command is used to itegrate different branches into a single branch.

Step 05 -> git merge branch_name

The git push command is used to upload the content from the local repository to the remote repository.

Step 06 -> git push origin main

The git pull command is used to fetch the new commits and merge them into the local branch.

Step 07 -> git pull https://github.com/Md-Soliman-Ali/Git/blob/main/README.md

Step 07 -> git pull origin main

The git clone command is used to create a copy of the target repository or create a clone in a new directory at a new place.

Step 08 -> git clone https://github.com/Md-Soliman-Ali/Git.git

A branch refers to an independent line of development. The git branch command is used to create, list, rename & delete branches.

Step 09 -> git branch branch_name

The git checkout command works together with the git branch command. The command enables the navigation between the branches

Step 10 -> git checkout branch_name



git config -> The git config command is used to set configurations like the name, email id etc. This information should be provided as soon as Git is installed, since it is used by Git at every commit.

git diff -> The git diff command is referred to as multi use command that runs the function on different Git data sources. The command shows the difference between the changes made on a file.

git log -> The git log command is used to view the previous commits that have taken places in the Git project. When the list appears on the screen, it shows the reverse chronological order.

git reset -> The git reset command is used to undo the local changes that are made to the state of a Git repository.

git rebase -> rebasing refers to the moving or combining a sequence of commits. The git rebase command is used to integrate changes from one branch to another.