What's the difference between git push and git commit?

0 votes
What's the difference between git push and git commit? I know it's probably a stupid doubt but this really got me confused.
Jan 2 in Git & GitHub by Ali
• 10,290 points
58 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

There are basically three areas when you're working with git:

Work area -> Staging area -> Local repository -> Remote repository(Github)

  • When you create any file you're working in the work area
  • When you do a git add filename, you add the file from the working area to the staging area
  • When you do git commit, it adds the file from staging area to local repository
  • When you do a git push, it adds the file from the local repository to a remote repository like GitHub.
answered Jan 2 by Vishnu
0 votes

I installed ubuntu on vagrant and gave password configuration as Yes in SSHD_Config file but it ended up throwing an error.

I dont know what's going wrong. 

answered Jan 2 by Ali
• 10,290 points

Related Questions In Git & GitHub

0 votes
1 answer

difference between git fetch and git pull

Both fetch and pull are used to ...READ MORE

answered Jun 27, 2018 in Git & GitHub by anonymous
383 views
0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,280 points
29 views
0 votes
1 answer

How to forcefully commit a file to Git even if the file is ruled as unchanged?

This is simple, just follow the below ...READ MORE

answered Jul 11, 2018 in Git & GitHub by Sophie may
• 9,050 points
21 views
0 votes
3 answers

Change commit message after committing and before push.

You also can use git filter-branch for that. git filter-branch ...READ MORE

answered Sep 6, 2018 in Git & GitHub by lina
• 8,100 points
67 views
+13 votes
2 answers
0 votes
1 answer
0 votes
2 answers

difference between git remote and git clone

git remote add just creates an entry in ...READ MORE

answered Aug 7, 2018 in Git & GitHub by Kalgi
• 35,750 points
230 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,360 points
14 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.