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, 2019 in Git & GitHub by Ali
• 10,670 points
335 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, 2019 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, 2019 by Ali
• 10,670 points

Related Questions In Git & GitHub

0 votes
1 answer

What is the difference between git fetch and git pull?

Hii @kartik, The main difference between git fetch ...READ MORE

answered Mar 3 in Git & GitHub by Niroj
• 32,080 points
229 views
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
3,233 views
0 votes
0 answers

Difference between git rebase and git merge? Which among them is better to use?

Difference between git rebase and git merge? ...READ MORE

Nov 25, 2019 in Git & GitHub by anonymous
• 10,310 points

closed Nov 25, 2019 by Sirajul 146 views
0 votes
1 answer
+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,420 points
533 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
• 51,890 points
2,858 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,420 points
65 views