Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Name a few git commands and explain their usage.



Name a few git commands and explain their usage...

Answer / Deepak Aswal

Here are some commonly used Git commands:n1. `git init`: Initialize a new Git repository.n2. `git add <file>` or `git add .`: Stage changes to the Git index for future commit.n3. `git commit -m "<commit-message>"`: Commit staged changes with a message.n4. `git branch <branch-name>`: Create a new branch.n5. `git checkout <branch-name>`: Switch to another branch.n6. `git merge <branch-name>` or `git pull --rebase origin <branch-name>`: Merge changes from another branch into the current branch.n7. `git status`: Show the current state of the working directory and staged files.n8. `git log`: Display the commit history.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Git Interview Questions

What is a distributed vcs?

1 Answers  


What is the common branching pattern in GIT?

1 Answers  


What is git and why do we use it?

1 Answers  


What does ‘hooks’ comprise of in git?

1 Answers  


What is rebasing syntax in git?

1 Answers  


Explain the difference between rebase and merge?

1 Answers  


What is the purpose of branching in GIT?

1 Answers  


How to squash or fixup commits?

1 Answers  


How git instaweb is used?

1 Answers  


What are the advantages of using GIT?

1 Answers  


What is git bisect?

1 Answers  


What is the function of ‘git rm’?

1 Answers  


Categories