GitHub - Pushing and Pulling

Can someone elaborate on GitHub - pushing and pulling?

Hi @monicas1628 in git pushing means pushing i.e sending or uploading your code to the git cloud storage from your local machine where you would have a clone of that git repo. And pulling means the exact opposite it means fetching code from the cloud in to your local machine. For example in your local machine in the clone of the repo u develop a game called trick version 0.1 and push it to the git, now while working on the version 0.2 of the game for some reason u lost the data then you could just pull the version 0.1 in to your local machine and start working again without worrying to have to start over again. This is the sole purpose of git for version control. I hope I was able to clear your doubt a little bit

1 Like

Push - pushing sends the recent commit history from your local repository up to GitHub. If you’re the only one working on a repository, pushing is fairly simple. If there are others accessing the repository, you may need to pull before you can push.

Pull - a pull grabs any changes from the GitHub repository and merges them into your local repository it’s more useful in a group environment where more than one person is submitting changes to a single repository.

This is a most basic and clear explanation
As github is a cloud storage of codes or project you and your team working on, here we work on codes develope them individually(every member of team) in a different branch of a repository. Suppose we have a project blueprint(basic version) as main “master” branch, now in order to change them or add more features, we firstly create a different branch we CLONE the repository to our local system and develop the codes staying in different branch. Now in order to do the following, we perform these…

Git PUSH refers to the sending codes that you developed locally to the cloud repository in branch you created or working on(Suppose branch name is "dev”). Your codes will be uploaded to the cloud by pushing them commands are.
git push -u origin dev

Git PULL this is a request to merge the " dev" branch explained above to the main branch “master” of the repository so that master branch have, error-free completely devoloped codes. Admin of the repository accept your pull request to merge them, to the master if no errors are found.

Hope this explanation clear your doubts in basic way. To learn more, i suggest you to visit

1 Like