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
• 11,260 points
516 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
• 11,260 points

Related Questions In Git & GitHub

0 votes
2 answers

What is the difference between git fetch and git pull?

Hii.. I HOPE BELOW ANSWER  MAY HELP YOU- In ...READ MORE

answered Jul 17 in Git & GitHub by anonymous
552 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,759 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
• 16,040 points

closed Nov 25, 2019 by Sirajul 184 views
0 votes
1 answer
+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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
676 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 10 in Git & GitHub by anonymous
3,758 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
86 views