As I have read that commit means we have updated some code which has bugs and commited that code from where the issue is raised. But what is a pull request.
Asked
Active
Viewed 3.5k times
19
-
2See this to get an idea http://stackoverflow.com/questions/2745076/what-are-the-differences-between-git-commit-and-git-push – mmuzahid Jan 26 '16 at 06:13
-
By the way, you can also commit code with no bugs on it. – Evin1_ Jan 26 '16 at 06:18
-
@mmuzahid: Thank You for the link, it is a very well made and self explanatory diagram – invinciblemuffi Jan 26 '16 at 06:19
-
1@Evin1_, that's impossibru – Janne Matikainen Jan 26 '16 at 06:22
-
What do we mean by committing code code with no bugs on it, what is it considered here – invinciblemuffi Jan 26 '16 at 06:24
-
2There are really good differences shown here below, others can read and benifit from it, why is the question downvoted – invinciblemuffi Jan 26 '16 at 06:34
2 Answers
30
A pull request is a way to 'commit' to a repository in which you don't have writing permissions.
The maintainers of that repository will check your request and decide if they either want to merge it with your code or leave the original as it is.

Evin1_
- 12,292
- 9
- 45
- 47
30
A commit is a discrete change to one or more files. It is a critical part of Git.
A pull request is a request to merge one or more commits into a different branch. It is not part of Git; it is only part of GitHub (and similar services like BitBucket).
See also the Try Git tutorial, in which you can explore some of the differences farther.

Aaron Brager
- 65,323
- 19
- 161
- 287
-
Thank you for bringing up and explaining this simple difference – invinciblemuffi Jan 26 '16 at 06:29
-
-
1I think that you mean: if you need to commit on **origin** (your online version). Then you use push. https://help.github.com/articles/pushing-to-a-remote/ – Evin1_ Jan 26 '16 at 06:35
-
As I have understood from your answer above, if we commit on a branch other than master on someone else's repository, than it is called pull request else if we commit in our own repository it is called push. Correct me if I am wrong. Thank you. – invinciblemuffi Jan 26 '16 at 09:26
-
6Not quite, if you want to update any branch of your own code with your changes you use **commit**, if you want to update any branch of someone else's code you use a **pull request**, if you want to update your online repository you use **push**, if you want to update your local repository with the online changes you use **pull**. – Evin1_ Jan 26 '16 at 15:15