Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between a push / pull and commit in source tree?

Is it possible to see the difference between a push / pull and a commit in the log view in SourceTree?

like image 542
Breako Breako Avatar asked Aug 02 '13 13:08

Breako Breako


People also ask

What is the difference between a commit and a push?

Commit - committing is the process which records changes in the repository. Think of it as a snapshot of the current status of the project. Commits are done locally. Push - pushing sends the recent commit history from your local repository up to GitHub.

What is commit in SourceTree?

When you add a new file to your repository or make a change, you need to stage, commit, and push that change to your remote repository. After you make the change, you'll notice your new file in Sourcetree. From the options menu of the new file, select Stage file. Click the Commit button at the top to commit the file.

What is the difference between pull and commit?

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).

What is push pull and commit in git?

The git push command is used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repository. It's the counterpart to git fetch but whereas fetching imports commits to local branches, pushing exports commits to remote branches.


1 Answers

a commit is saving the state of your code into version control

http://git.github.io/git-reference/basic/#commit

a push is sending your commited coded to a remote server (e.g. github)

http://git.github.io/git-reference/remotes/#push

a fetch is downloading the newest changes from a remote server to your local repository, but keeping your repo as is.

http://git.github.io/git-reference/remotes/#fetch

a pull is downloading the newest changes from a remote server to your local repository and checking out the newest code from the repo.

http://git.github.io/git-reference/remotes/#pull

like image 194
xero Avatar answered Sep 20 '22 08:09

xero