Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to learn a little about git. I know a decent amount of svn so i understood the tortoiseGit interface. What i don't understand is the pull VS fetch and the push. What is the difference between commit and push? what is pull vs fetch? and what is this stash save and apply?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Push and pull are specific to decentralized Version Control Systems.

You should read this book http://book.git-scm.com/ It explains all you need to know

With DCVSs, the repository is local. If you just commit, it won't be shared on the remote server.

The push command sends your local commits to the remote server, and merges them.

Pull = Fetch + Merge Git gets the commits from the remote server (fetch) as a remote tracking branch, then merges them in your branch.

Stashing is a special feature. It allows you to store your uncommited modifications into a stash, and deletes it from the branch you are working on. You can retreive them later by applying the stash.

It's really useful when you're in the middle of a big change, and you just want to do a quick fix. You just have to stash you changes, write the fix, commit it and then applying your saved stash to go back to your work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.