😻 Git Hub Commands 😻

Git logo

Command :   git init

Description :

This Command initializes a hidden .git folder in the directory.

Git logo

Command :   git status

Description :

This Command shows all files in the directory, indicating whether they are tracked or untracked.

Git logo

Command :   git add .

Description :

Adds all changes in the current directory to the staging area and converts untracked files to tracked files.

Git logo

Command :   git config user.name

Description :

Shows the GitHub username registered with your local machine.

Git logo

Command :   git config user.email

Description :

This Command shows the email registered with your local Git configuration.

Git logo

Command :   git config user.name Github_Username

Description :

Registers your GitHub username with your local Git configuration.

Git logo

Command :   git config user.email Email_ID

Description :

Registers your email with your local Git configuration. (It must match your GitHub account email.)

Git logo

Command :   git commit -m "Write Your Message"

Description :

Commits all staged files with a descriptive message. (Think of a commit as saving your work.)

Git logo

Command :   git remote -v

Description :

Shows all remotes linked to the current repository.

Git logo

Command :   git remote add Remote_Name Repository_Link

Description :

Creates a remote connection between your local repository and a GitHub repository.

Command :   git branch

Description :

This command will inform you of the branch in which your directory is now active.

Command :   git branch Branch_Name

Description :

This Command Will Create An New Branch With An Existing Name.

Command :   git checkout Branch_Name

Description :

This Command Will Switch Between The Branches.

Command :   git push Remote_Name Branch_Name

Description :

This Command Will Push All Your Files in The Local Directory To The Remote Github Repository. (Make Sure That The Remote_Name Is Linked With Which Repository).

Command :   git pull Remote_Name Branch_Name

Description :

This Command is used to fetch and merge changes from a remote repository into your Local repository.

Command :   git fetch Remote_Name Branch_Name

Description :

This Command is used to retrieve the latest commits and changes from a remote repository without merging them into your local Directory.

Command :   git merge Branch_Name

Description :

This Command Will tell About The Git attempts to merge the changes from the "main" branch into your current branch, incorporating any new commits and modifications that have been made on the "main" branch since the branches diverged. Git automatically combines the changes, and if there are no conflicts, it creates a new merge commit that joins the two branches together. (Here "main" is an Branch_Name)

Command :   git clone Repository_URL

Description :

This Command Will Tell That It Will Create an Clone or Duplicate Directory Of That Github Repository.

Command :   git log

Description :

This Command Will Show The All Past and Present Commits

Command :   git remote rename Old_Name New_Name

Description :

This command renames a remote repository. If you have multiple remotes and want to change the name of one of them, you can use this command to update the remote's name.

Command :   git remote remove Remote_Name

Description :

This command removes a remote repository from your local Git repository. It disconnects the local repository from the specified remote repository.

Command :   git remote show Remote_Name

Description :

This command displays detailed information about a specific remote repository. It shows information such as the remote's URL, the branches it tracks, and the last fetched or pushed references.