Git Commands

+1 vote

What does this command exactly do? - 

git commit -a -m "message"
Apr 26, 2018 in Git & GitHub by Atul
• 10,240 points
693 views

2 answers to this question.

0 votes
Best answer

This command basically adds all your changes and commits it to your github repo with a commit message. 

You can also do the same in two separate steps(which is preferable)

$git add .
$git commit -m "message"
answered Aug 14, 2018 by Kalgi
• 52,360 points
–1 vote

To answer this question the best way possible you need to understand two concepts -Indexing & Committing.

Indexing: After you have created a new file or made changes to it, you need to move it from the working directory to the index.

For that, we use git add <file name>

Or, git add -A (-A means add all files that are in the working directory)

Committing: After you have added them to the index, it is ready to get committed.

For that, we use git commit -m “message”

Or, git commit -a -m “message” (-a means add all modified files in the index)

answered Apr 26, 2018 by DragonLord999
• 8,450 points

Related Questions In Git & GitHub

0 votes
2 answers

Are the commands git stash apply and git stash pop the same?

The key difference in is the fact ...READ MORE

answered Jun 17, 2020 in Git & GitHub by Cameron
• 140 points
8,807 views
–1 vote
1 answer

Having problem in Github and remote Git repo with production and development code

I think you could start with this. The ...READ MORE

answered Apr 10, 2018 in Git & GitHub by shubham
• 7,340 points

edited Dec 15, 2023 by Khan Sarfaraz 745 views
0 votes
1 answer

Git origin not found

For this to work, you need to ...READ MORE

answered Apr 25, 2018 in Git & GitHub by DragonLord999
• 8,450 points
1,202 views
0 votes
1 answer

Configure Git and GitHub

In version control with Git, we deal ...READ MORE

answered Apr 26, 2018 in Git & GitHub by DragonLord999
• 8,450 points
463 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,460 views
+2 votes
1 answer
0 votes
3 answers

difference between git remote and git clone

HI.... GIT REMOTE add just creates an entry in ...READ MORE

answered Jul 11, 2020 in Git & GitHub by anonymous
21,259 views
+1 vote
4 answers

GIT plugin in jenkins not able to connect to GIT repository

This looks like a git configuration issue, ...READ MORE

answered Oct 25, 2018 in Git & GitHub by Alia
18,786 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP