Hi Guest 1 HomePage 1 Jobs 1 WalkIn 1Articles  

 :) Latest Topic
Git Tutorial
What is Git?
Features of Git
Benefits of Git
Why use Git?
GitHub Introduction
GitHub Features
GitHub Benefits
Git vs GitHub
Git vs SVN
Git vs Mercurial
Version Control System
Distributed Version Control
Install Git on Windows
Install Git on Linux
Install Git on MAC
Git Environment Setup
Git configuration levels
Git Tools
Git Third Party Tools
Git Terminology Part1
Git Terminology Part2
Git Commands Part1
Git Commands Part2
Git Commands Part3
Git Cheat Sheet
 


  

 
Git Commands Part3
Question Posted on 21 Nov 2023

Home >> Tutorial >> Git Tutorial >> Git Commands Part3


Git Commands Part3
Below are the 12 most essential Git command that we used on daily basis are explain below:-

(7)Git push Command
When we say about the Git Push COmmand it is used to upload your local repository content to a remote repository. And when we say about "Pushing" it is an act of transfer commits from your local repository to a remote repo. We can also say that Git Fetch is complement to this Git Push command whereas fetching imports commit to local branches on comparatively pushing exports commits to remote branches. We can configure Remote branch by using Git Remote Command. Pushing is capable of overwriting changes, and caution should be taken when pushing.
Below is the use of Git Push command:-

Git push origin master"

We use above commands to sends the changes made on the master branch to your remote repository. Below is the syntax of command:-

$ git push [variable name] master"

width="100%" />

Git push -all

And above command will pushes all the branches to the server repository.

Syntax

$ git push --all

width="100%" />


(8)Git pull Command

Well pull command is mainly used to receive data from GitHub. And it fetches and merges changes on the remote server to your working directory.

Syntax

$ git pull URL

width="100%" />


(9)Git Branch Command

This command is mainly used to get lists all the branches available in the repository.

Syntax

$ git branch

width="100%" />


(10)Git Merge Command

This command is used to merge the specified branchs? history into the current branch.

Syntax

$ git merge BranchName

width="100%" />


(11)Git log Command

Well this command is used to check the commit history.

Syntax

$ git log

width="100%" />

And by default, if we will not pass argument passed, Git log shows the most recent commits first. We can limit the number of log entries displayed by passing a number as an option, such as -3 to show only the last three entries.

$ git log -3


(12)Git remote Command

Well we used Git Remote command to connect your local repository to the remote server. And this command will allows you to create, view and delete connections to the other repositories. And these connections are more like bookmarks rather than direct links into other repositories. And this command does not provide real-time access to repositories.

width="100%" />
Now to next step





Other Important Questions
Git Third Party Tools
What is Git?
GitHub Introduction
Features of Git
GitHub Features







 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |