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,430 points
130 views

2 answers to this question.

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,430 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
1,414 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
71 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,870 points
49 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,110 points
144 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
211 views
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
• 42,280 points
927 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,380 points
35 views